wealth/docs/pages/market/layout.md

3.7 KiB
Raw Blame History

Layout: root

apps/{bull,bear}/src/app/layout.tsx · wraps every page of both apps · it awaits no read, so it adds nothing to any page's first flush and can't answer 500 on its own

Section Data HTML JS Index Notes
<html lang dir> and the critical font preload config first flush none no lang and dir from the app's server i18n; only CRITICAL_FONT_URL is preloaded (0011)
AppProviders › AppShell — first flush hydrate no the client bootstrap, query client, i18n, and the browser-only hooks: useSession (the viewer is read once per load, so every auth-dependent part waits in its skeleton), useSuspendedHalt, useSettleAbandonedPayment (0033), usePwa (0047), and the persisted drafts' rehydrate
↳ NetworkBoundary › NetworkStatus — none hydrate no renders only offline, reconnecting, or after a slow first read; a page's own top bar or header draws it through NetworkBar (0040), and this one draws only when no bar registered
ToastPlacementMarker (bear) config none hydrate no desktop toasts 32px from the bottom (0039)
↳ Toaster — none hydrate no sonner's region; empty until an action toasts (0019)

Scripts: none. No next/script in either app or packages/integrations.

Notes

  • Metadata: rootMetadata() from apps/*/src/configs/seo.ts gives metadataBase, the title template %s · <brand>, and the description; pages add their own title and robots. htmlLimitedBots: /.*/ keeps all of it in <head> (0054).
  • Viewport: bull sets maximumScale: 1 (0056); bear keeps Next.js's default viewport.
  • The manifest (app/manifest.ts, the same for both apps, 0053) and /sw.js (pwa lib) are linked from here. next.config.ts 308-redirects /@username/… to /channels/username/… before any render (0064).
  • The (flow), (auth) and (onboarding) layouts render nothing; they only set dynamic = 'force-dynamic' (0026). The (main) layout is layout-main.md.
  • AppShell is a client component around every page, but it adds no <Suspense> around children, so it doesn't stream any page.