perf(PROJ-77): Admin-Tabs per next/dynamic laden statt statisch importieren
18 Admin-Tab-Komponenten wurden bisher alle statisch in src/app/admin/page.tsx importiert, unabhängig davon welcher Tab tatsächlich geöffnet wird. Umstellung auf next/dynamic mit gemeinsamem TabSkeleton-Loading-State reduziert das initiale JS-Bundle der Admin-Route um 204,9 KB (-19,8%). Initial aktiver Tab bleibt weiterhin serverseitig vorgerendert (ssr: true), kein Skeleton-Flash beim ersten Laden. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019j28kGcaJAhBnrYX34hGdt
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
209fdeb8ad
commit
e59b11743a
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
|
||||
/**
|
||||
* Einheitlicher Lade-Platzhalter für dynamisch nachgeladene Admin-Tabs.
|
||||
* Wird von next/dynamic als `loading`-Komponente verwendet (PROJ-77).
|
||||
*/
|
||||
export function TabSkeleton() {
|
||||
return (
|
||||
<div className="mt-4 space-y-4" aria-busy="true" aria-live="polite">
|
||||
<span className="sr-only">Inhalt wird geladen …</span>
|
||||
<Skeleton className="h-8 w-48" />
|
||||
<div className="space-y-2">
|
||||
<Skeleton className="h-4 w-full" />
|
||||
<Skeleton className="h-4 w-5/6" />
|
||||
<Skeleton className="h-4 w-2/3" />
|
||||
</div>
|
||||
<Skeleton className="h-48 w-full" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user