Add a default [portSlug]/loading.tsx that covers all 72 nested routes that previously rendered nothing during the cold-load gap. Uses the existing PageSkeleton (page-header + table-skeleton) so the empty-header flash on direct-URL visits / tab navigations is gone. Add tailored loading.tsx for the four other tab-strip detail surfaces so their initial paint mirrors the real page structure (header strip, pipeline stepper for interests, tab strip, two-column overview): - yachts/[yachtId]/loading.tsx - companies/[companyId]/loading.tsx - interests/[interestId]/loading.tsx - berths/[berthId]/loading.tsx (clients/[clientId]/loading.tsx already existed.) Closes ui/ux M3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18 lines
691 B
TypeScript
18 lines
691 B
TypeScript
import { PageSkeleton } from '@/components/shared/loading-skeleton';
|
|
|
|
/**
|
|
* Default route-level loading UI for every page under `(dashboard)/[portSlug]/...`.
|
|
*
|
|
* Renders while the server component resolves the session, port config,
|
|
* and the client component bootstraps its initial query. Replaces the
|
|
* empty-header flash on cold direct-URL visits and tab navigations.
|
|
*
|
|
* Individual routes can still ship their own `loading.tsx` for a more
|
|
* tailored skeleton (see `clients/[clientId]/loading.tsx` which mirrors
|
|
* the detail page's tab strip). When that file exists Next.js uses it
|
|
* in place of this default.
|
|
*/
|
|
export default function Loading() {
|
|
return <PageSkeleton />;
|
|
}
|