fix(layout): 公共移动 tab bar 不再泄漏到 /admin(DEF-03)
`src/app/layout.tsx` 无条件渲染 `<MobileTabBar />`,于是后台所有路由 (含 /admin/login)在 390 档都被「首页/行业/能力/洞察/联系」这条 fixed 底栏盖住 —— 2026-10-24 全站验收实测 18/18 命中(9 路由 × 明暗)。 改用 `MobileTabBarGate`:按 pathname 在 `/admin*` 返回 null。 它仍留在根布局(main/PageTransition 之外,fixed 定位不受 transform 影响)。 ⚠ 这个 gate 组件此前就在树里,但**没有任何调用点** —— check:dead 把它判成 「仅测试/死链引用」。本次接线后 dead 归零,也是「修复停在 stash 没落地」的 一处物证(见 docs/lessons-learned.md §5.61)。
This commit is contained in:
1 parent
c9b9c886d1
commit
cfd5079dd6
3 files changed
+58
-2
No files matched your search
+4
-2
@@ -9,7 +9,7 @@ import { PerformanceTracker } from "@/components/analytics/PerformanceTracker";
|
||||
import { OutboundLinkTracker } from "@/components/analytics/OutboundLinkTracker";
|
||||
import { ScrollDepthTracker } from "@/components/analytics/ScrollDepthTracker";
|
||||
import { OrganizationSchema, WebsiteSchema, LocalBusinessSchema } from "@/components/seo/structured-data";
|
||||
import { MobileTabBar } from "@/components/layout/mobile-tab-bar";
|
||||
import { MobileTabBarGate } from "@/components/layout/mobile-tab-bar-gate";
|
||||
import { ErrorBoundary } from "@/components/ui/error-boundary";
|
||||
import { ScrollProgress } from "@/components/ui/scroll-progress";
|
||||
import { MotionProvider } from "@/components/ui/motion-provider";
|
||||
@@ -214,8 +214,10 @@ export default async function RootLayout({
|
||||
</ClientLayout>
|
||||
</SiteConfigProvider>
|
||||
</ErrorBoundary>
|
||||
{/* 公共移动 tab bar 留在根布局(main/PageTransition 之外,fixed 定位不受 transform 影响),
|
||||
只按 pathname 在 /admin 下关闭:/admin 是内部系统,露出公共导航会盖住后台内容(DEF-03)。 */}
|
||||
<Suspense fallback={null}>
|
||||
<MobileTabBar />
|
||||
<MobileTabBarGate />
|
||||
</Suspense>
|
||||
<CookieConsent />
|
||||
<BackToTop />
|
||||
|
||||
Reference in new issue
Block a user