From b586db0de7bb7a7410a3326d2498959a201f8c24 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Wed, 14 Oct 2026 09:08:49 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B3=B4=EA=B3=A0=20=EC=9E=88=EB=8A=94?= =?UTF-8?q?=20=ED=83=AD=EC=9D=84=20=EB=8B=A4=EC=8B=9C=20=EB=88=84=EB=A5=B4?= =?UTF-8?q?=EB=A9=B4=20=EB=A7=A8=20=EC=9C=84=EB=A1=9C=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/BLayout.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/b/BLayout.tsx b/frontend/src/b/BLayout.tsx index fca9a25..bbb3afa 100644 --- a/frontend/src/b/BLayout.tsx +++ b/frontend/src/b/BLayout.tsx @@ -48,17 +48,17 @@ function TopBar() { const tab = TABS.find((t) => t.to !== '/' && pathname.startsWith(t.to)) return ( -
+
{tab?.title ?

{tab.title}

:

날씨각

} {mePending ? ( @@ -208,6 +208,10 @@ function Shell() { useEffect(() => { window.scrollTo({ top: 0 }) }, [pathname]) + // 지금 보고 있는 탭을 다시 누르면 맨 위로 + const toTopIfHere = (to: string) => () => { + if (pathname === to) window.scrollTo({ top: 0, behavior: 'smooth' }) + } useEffect(() => { document.querySelector('meta[name="theme-color"]')?.setAttribute('content', NOTCH_BG[kind]) }, [kind]) @@ -228,14 +232,14 @@ function Shell() { {TABS.map((t) => t.key === 'today' ? ( // 메인 탭: 막대 위로 솟은 큰 주황 동그라미 - cx('b-tab-main relative -mt-6 flex flex-col items-center gap-1 text-[12px] font-extrabold', isActive ? 'text-(--orange)' : 'text-(--ink3)')}> + cx('b-tab-main relative -mt-6 flex flex-col items-center gap-1 text-[12px] font-extrabold', isActive ? 'text-(--orange)' : 'text-(--ink3)')}> {t.label} ) : ( - cx('flex flex-col items-center gap-0.5 text-[11px] font-extrabold', isActive ? 'text-(--ink) [&_svg]:stroke-[2.4]' : 'text-(--ink3) [&_svg]:stroke-[1.9]')}> + cx('flex flex-col items-center gap-0.5 text-[11px] font-extrabold', isActive ? 'text-(--ink) [&_svg]:stroke-[2.4]' : 'text-(--ink3) [&_svg]:stroke-[1.9]')}> {t.label}