- Add segment-level loading.tsx for dashboard, search, admin, and auth routes - Add segment-level error.tsx with Vietnamese error messages for all route groups - Add skip-to-content navigation link in root layout - Add id="main-content" to all layout main elements - Add aria-label to nav elements and mobile menu buttons - Improve dashboard nav responsiveness (icon-only on mobile) - Hide user name on small screens in dashboard layout Co-Authored-By: Paperclip <noreply@paperclip.ing>
61 lines
2.4 KiB
TypeScript
61 lines
2.4 KiB
TypeScript
export default function AdminLoading() {
|
|
return (
|
|
<div className="space-y-6">
|
|
{/* Header skeleton */}
|
|
<div className="flex items-center justify-between">
|
|
<div>
|
|
<div className="h-7 w-36 animate-pulse rounded bg-muted" />
|
|
<div className="mt-2 h-4 w-48 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
<div className="h-9 w-24 animate-pulse rounded-md bg-muted" />
|
|
</div>
|
|
|
|
{/* Stats grid skeleton */}
|
|
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
|
{Array.from({ length: 4 }).map((_, i) => (
|
|
<div key={i} className="rounded-lg border bg-card p-6 shadow-sm">
|
|
<div className="flex items-center justify-between">
|
|
<div className="h-4 w-24 animate-pulse rounded bg-muted" />
|
|
<div className="h-4 w-4 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
<div className="mt-3 h-7 w-20 animate-pulse rounded bg-muted" />
|
|
<div className="mt-2 h-3 w-28 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
))}
|
|
</div>
|
|
|
|
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
{Array.from({ length: 3 }).map((_, i) => (
|
|
<div key={i} className="rounded-lg border bg-card p-6 shadow-sm">
|
|
<div className="flex items-center justify-between">
|
|
<div className="h-4 w-24 animate-pulse rounded bg-muted" />
|
|
<div className="h-4 w-4 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
<div className="mt-3 h-7 w-20 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
))}
|
|
</div>
|
|
|
|
{/* Revenue chart skeleton */}
|
|
<div className="rounded-lg border bg-card shadow-sm">
|
|
<div className="p-6">
|
|
<div className="h-5 w-48 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
<div className="px-6 pb-6">
|
|
<div className="space-y-4">
|
|
{Array.from({ length: 6 }).map((_, i) => (
|
|
<div key={i} className="space-y-2">
|
|
<div className="flex items-center justify-between">
|
|
<div className="h-3 w-20 animate-pulse rounded bg-muted" />
|
|
<div className="h-3 w-28 animate-pulse rounded bg-muted" />
|
|
</div>
|
|
<div className="h-2 w-full animate-pulse rounded-full bg-muted" />
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|