The root layout called `await cookies()` to read the locale, which marked the entire app as dynamic. In Next.js 16, dynamic pages have Router Cache staleTime=0, causing a fresh RSC server roundtrip on every navigation — the root cause of ~400ms tab switching delays. - Remove cookies() from root layout, making it static - Add LocaleSync client component to read locale cookie on the client - Add loading.tsx skeleton for dashboard routes as a loading fallback |
||
|---|---|---|
| .. | ||
| (auth)/login | ||
| (dashboard) | ||
| (landing) | ||
| auth/callback | ||
| favicon.ico | ||
| custom.css | ||
| globals.css | ||
| layout.tsx | ||
| robots.ts | ||
| sitemap.ts | ||