From 56aeb424af065666824784ea2c6083f58e9fbb07 Mon Sep 17 00:00:00 2001 From: vsxd Date: Fri, 13 Mar 2026 11:08:35 +0800 Subject: [PATCH] fix(web): landing page no longer nested inside Layout header/footer When pathname is '/', Layout now renders only the Outlet without its own header/footer chrome, so the landing page's self-contained layout displays correctly. --- web/src/app/layout.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index 8418a4cb..f2478a8b 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -1,9 +1,19 @@ import { Suspense } from 'react' -import { Outlet, Link } from '@tanstack/react-router' +import { Outlet, Link, useRouterState } from '@tanstack/react-router' import { useAuth } from '@/features/auth/use-auth' export function Layout() { const { user, isLoading } = useAuth() + const pathname = useRouterState({ select: (s) => s.location.pathname }) + const isLanding = pathname === '/' + + if (isLanding) { + return ( + + + + ) + } return (