From 2a200f70888430ee08cc227722a1672c39829bb8 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sat, 10 Feb 2024 19:49:06 -0800 Subject: [PATCH] fix build issue by keying all list items --- src/app/author/[author]/page.tsx | 31 ++++++++++++++----------------- src/app/layout.tsx | 18 +++++++++--------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/app/author/[author]/page.tsx b/src/app/author/[author]/page.tsx index 83ae5b1..bdcf410 100644 --- a/src/app/author/[author]/page.tsx +++ b/src/app/author/[author]/page.tsx @@ -1,7 +1,7 @@ import { authors, affiliations, nationalities } from '../../db/data' -import { navigate } from '../../actions' import { Zilla_Slab } from 'next/font/google' import Link from 'next/link' +import { Fragment } from 'react' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] }) @@ -11,9 +11,8 @@ export default function Page({ params: { author: string } }>) { const authorData = authors[params.author] - console.log(authorData) + // console.log(authorData) if (!authorData) { - navigate('/404') return } @@ -43,14 +42,14 @@ export default function Page({ const position = a.split('@')[0] const affiliation = affiliations[a.split('@')[1]].name return ( - <> + {position} at{' '} {affiliation} - + ) })} @@ -61,22 +60,20 @@ export default function Page({ if (!formerAffiliations) return null return ( <> +

Former Positions:

{formerAffiliations?.map((a: string, i: number) => { const position = a.split('@')[0] const affiliation = affiliations[a.split('@')[1]].name return ( - <> -

- Former Positions: -

+ {position} at{' '} {affiliation} - + ) })} @@ -89,12 +86,10 @@ export default function Page({ const nationalityData = nationalities[nationality] const { demonym, flag } = nationalityData return ( - <> -
- - {demonym} -
- +
+ + {demonym} +
) } @@ -149,7 +144,9 @@ export default function Page({
{nationality.map((n: string) => ( - + + + ))}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 81a7e35..0c5e033 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -61,31 +61,31 @@ export default function RootLayout({
    -
  • +
  • About
  • -
  • +
  • Help
  • -
  • +
  • Contact
  • -
  • +
  • Subscribe
  • -
  • +
  • Copyright
  • -
  • +
  • Privacy Policy
  • -
  • +
  • Accessibility
  • -
  • +
  • eeXiv status
  • -
  • +
  • Get status notifications