From fc3154189aa6ab390fdaf65cf4aece4489561330 Mon Sep 17 00:00:00 2001 From: jo-elimu <1451036+jo-elimu@users.noreply.github.com> Date: Thu, 19 Oct 2023 19:03:58 +0700 Subject: [PATCH] fix link error --- components/CustomLink.js | 2 +- components/Header.js | 2 +- pages/index.js | 27 +++++++++++++-------------- pages/posts/[slug].js | 36 ++++++++++++++++-------------------- 4 files changed, 31 insertions(+), 36 deletions(-) diff --git a/components/CustomLink.js b/components/CustomLink.js index f3fa884..ceba536 100644 --- a/components/CustomLink.js +++ b/components/CustomLink.js @@ -3,7 +3,7 @@ import Link from 'next/link'; export default function CustomLink({ as, href, ...otherProps }) { return ( <> - + diff --git a/components/Header.js b/components/Header.js index 2a51426..2076150 100644 --- a/components/Header.js +++ b/components/Header.js @@ -5,7 +5,7 @@ export default function Header({ name }) {

- + {name}

diff --git a/pages/index.js b/pages/index.js index 3bf4e44..5a9a613 100644 --- a/pages/index.js +++ b/pages/index.js @@ -26,21 +26,20 @@ export default function Index({ posts, globalData }) { - - {post.data.date && ( -

- {post.data.date} -

- )} -

{post.data.title}

- {post.data.description && ( -

- {post.data.description} -

- )} - -
+ {post.data.date && ( +

+ {post.data.date} +

+ )} +

{post.data.title}

+ {post.data.description && ( +

+ {post.data.description} +

+ )} + ))} diff --git a/pages/posts/[slug].js b/pages/posts/[slug].js index 27c828e..697a856 100644 --- a/pages/posts/[slug].js +++ b/pages/posts/[slug].js @@ -58,29 +58,25 @@ export default function PostPage({
{prevPost && ( - - -

- Previous -

-

- {prevPost.title} -

- -
+ +

+ Previous +

+

+ {prevPost.title} +

+ )} {nextPost && ( - - -

- Next -

-

- {nextPost.title} -

- -
+ +

+ Next +

+

+ {nextPost.title} +

+ )}