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.
This commit is contained in:
vsxd 2026-03-13 11:08:35 +08:00
parent f7df348a5a
commit 56aeb424af

View file

@ -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 (
<Suspense fallback={null}>
<Outlet />
</Suspense>
)
}
return (
<div className="min-h-screen bg-background bg-dots relative">