From 6bbeb68b46bf3c1cd023fc3193c3a8d517a6b061 Mon Sep 17 00:00:00 2001 From: Johnson Mao Date: Thu, 19 Oct 2023 21:15:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20header=20co?= =?UTF-8?q?mponent=20computed=20scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/[lang]/layout.tsx | 4 +- src/app/[lang]/page.tsx | 10 +-- src/app/[lang]/posts/[postId]/page.tsx | 8 ++- src/app/[lang]/posts/page.tsx | 10 +-- src/components/Header/Header.tsx | 84 +++++++++++++++++--------- src/components/Header/Logo.tsx | 48 --------------- 6 files changed, 76 insertions(+), 88 deletions(-) delete mode 100644 src/components/Header/Logo.tsx diff --git a/src/app/[lang]/layout.tsx b/src/app/[lang]/layout.tsx index c002735..27df975 100644 --- a/src/app/[lang]/layout.tsx +++ b/src/app/[lang]/layout.tsx @@ -38,7 +38,7 @@ async function I18nLayout({ params: { lang }, }: React.PropsWithChildren & RootParams) { const { common } = await getDictionary(lang); - const logo = { + const avatar = { src: avatarUrl, alt: name, }; @@ -55,7 +55,7 @@ async function I18nLayout({ return ( <> -
+
{children}