Files
Ichsan Kurniawan c6ecabd084 Refresh task loading skeletons
Updated loading states across the task dashboard, client detail, and project detail pages to match the current UI structure more closely. This change standardizes placeholder shapes, improves accessibility labels, and refines skeleton layouts for headers, stat blocks, filters, and card grids for a more consistent loading experience.
2026-10-07 11:17:21 +07:00

50 lines
2.4 KiB
TypeScript

export default function Loading() {
return (
<div
className="flex-1 space-y-8 p-4 sm:p-8 pt-4 sm:pt-6"
role="status"
aria-label="Loading tasks"
>
{/* Header: Title, Subtitle, and Controls */}
<div className="flex flex-col md:flex-row md:items-center justify-between gap-4">
<div className="space-y-2">
<div className="h-8 w-56 sm:w-64 animate-pulse rounded-lg bg-muted" />
<div className="h-4 w-72 sm:w-96 animate-pulse rounded bg-muted" />
</div>
<div className="flex items-center gap-3">
<div className="h-10 w-36 sm:w-44 animate-pulse rounded-lg bg-muted" />
<div className="h-10 w-28 sm:w-32 animate-pulse rounded-lg bg-muted" />
</div>
</div>
{/* Filter and Search Bar Skeleton */}
<div className="h-11 w-full animate-pulse rounded-xl border border-border bg-card" />
{/* Content Cards Grid Skeleton */}
<div className="grid gap-4 sm:gap-6 md:grid-cols-2 lg:grid-cols-3">
{Array.from({ length: 6 }).map((_, i) => (
<div key={i} className="rounded-2xl border border-border bg-card p-5 space-y-4 shadow-2xs">
{/* Top: Avatar and Title */}
<div className="flex items-start gap-3.5">
<div className="h-12 w-12 shrink-0 animate-pulse rounded-xl bg-muted" />
<div className="min-w-0 flex-1 space-y-2">
<div className="h-5 w-3/4 animate-pulse rounded bg-muted" />
<div className="h-4 w-1/3 animate-pulse rounded bg-muted" />
</div>
</div>
{/* Mid preview strip */}
<div className="h-14 w-full animate-pulse rounded-xl border border-border/50 bg-muted/20" />
{/* Bottom metrics row */}
<div className="flex items-center justify-between border-t border-border/60 pt-3">
<div className="h-4 w-28 animate-pulse rounded bg-muted" />
<div className="h-4 w-20 animate-pulse rounded bg-muted" />
</div>
</div>
))}
</div>
</div>
);
}