diff --git a/package.json b/package.json index 437e659..543ce38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "www-aaronjy-me", - "version": "2.1.1", + "version": "2.1.2", "private": true, "type": "module", "lint-staged": { diff --git a/src/components/Book/BookReview.jsx b/src/components/Book/BookReview.jsx index 81b1309..f4416a1 100644 --- a/src/components/Book/BookReview.jsx +++ b/src/components/Book/BookReview.jsx @@ -17,10 +17,9 @@ function BookReview({ review, html }) { return ( <>

- {title} -
- by {author} + {title} - {author}

+ Back...
diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index 0dfa2fb..6df3200 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -19,10 +19,6 @@ function Footer() { PGP key {", "} - - Send me an email - - {", "} - - {entries - .map((e) => ( - - - {!!e.datePublished && ( - {formatDate(e.datePublished)} - )} - - - {e.title} - - - )) - .slice(0, max > 0 ? max : entries.length)} - - +
+ {entries + .map((e) => ( +

+ {e.title}{" "} + {!!e.datePublished && {`on ${formatDate(e.datePublished)}`}} +

+ )) + .slice(0, max > 0 ? max : entries.length)} +
); } diff --git a/src/pages/[[...path]].jsx b/src/pages/[[...path]].jsx index 4538a1a..a4e3b8e 100644 --- a/src/pages/[[...path]].jsx +++ b/src/pages/[[...path]].jsx @@ -11,7 +11,6 @@ import { NextSeo } from "next-seo"; export async function getServerSideProps({ params }) { const { path } = params; - console.log(params); const res = await fetchBasicPages([], { path: { _eq: path?.join("/") ?? null, diff --git a/src/pages/library/index.js b/src/pages/library/index.js index 67ba7fb..e8f1c70 100644 --- a/src/pages/library/index.js +++ b/src/pages/library/index.js @@ -16,7 +16,7 @@ export async function getServerSideProps() { } const reviews = (await res.json()).data.sort( - (a, b) => new Date(b.read_date).getTime() - new Date(a.read_date).getTime(), + (a, b) => new Date(b.readDate).getTime() - new Date(a.readDate).getTime(), ); return { diff --git a/src/pages/writing/[slug].js b/src/pages/writing/[slug].js index 6e1817f..1133fea 100644 --- a/src/pages/writing/[slug].js +++ b/src/pages/writing/[slug].js @@ -4,27 +4,6 @@ import Article from "@/components/Article/Article"; import { fetchPosts, markdownToHtml } from "@/services/content-service"; import { FailedFetchPostError, FailedFetchPostsError } from "@/errors"; -// export async function getStaticPaths () { -// const res = await fetchPosts(['slug'], { -// status: 'published' -// }) - -// if (!res.ok) { -// throw new FailedFetchPostsError(await res.text()) -// } - -// const posts = (await res.json()).data - -// return { -// paths: posts.map(post => ({ -// params: { -// slug: post.slug -// } -// })), -// fallback: true // false or "blocking" -// } -// } - export const getServerSideProps = async ({ params }) => { const { slug } = params; const res = await fetchPosts([], { diff --git a/src/pages/writing/index.js b/src/pages/writing/index.js index 50fcdce..01b05b1 100644 --- a/src/pages/writing/index.js +++ b/src/pages/writing/index.js @@ -15,6 +15,7 @@ export const getServerSideProps = async () => { } const json = await res.json(); + const posts = json.data.sort( (a, b) => new Date(b.datePublished).getTime() - new Date(a.datePublished).getTime(),