Files
hats-app/app/(dashboard)/task/loading.tsx
T
Ichsan Kurniawan bd42c2defa Revamp task client and project detail pages
This commit adds dedicated loading states and a reusable Reveal animation, and refactors the task client/project detail flows to present a cleaner summary UI. It introduces richer client and project headers, delivery overview cards, improved work-order timeline/team sections, and more consistent visual styling across the task dashboard. The update also improves mobile readability and team assignment presentation, while keeping the same underlying data flow.
2026-10-06 15:58:43 +07:00

55 lines
2.7 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 and clients"
>
{/* Top Page Header Skeleton */}
<div className="flex flex-col md:flex-row md:items-center justify-between gap-4">
<div>
<div className="h-8 w-56 animate-pulse rounded-lg bg-muted" />
<div className="mt-2 h-4 w-72 max-w-full animate-pulse rounded bg-muted" />
</div>
<div className="flex flex-col sm:flex-row items-stretch sm:items-center gap-2.5 sm:gap-3 w-full md:w-auto">
<div className="h-10 w-full sm:w-44 animate-pulse rounded-md bg-muted" />
<div className="h-10 w-full sm:w-32 animate-pulse rounded-md bg-muted" />
</div>
</div>
{/* Filter and Layout Toolbar Skeleton */}
<div className="h-11 w-full animate-pulse rounded-xl border border-border bg-card" />
{/* Client Cards Grid Skeleton */}
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{Array.from({ length: 6 }).map((_, i) => (
<div
key={i}
className="overflow-hidden rounded-xl border border-border/80 bg-card shadow-2xs"
>
{/* Image Banner Skeleton */}
<div className="h-40 border-b border-border/50 bg-muted/20 animate-pulse" />
{/* Card Content Skeleton */}
<div className="p-5 space-y-3">
<div className="flex items-center justify-between">
<div className="h-4 w-16 animate-pulse rounded bg-muted" />
<div className="h-4 w-14 animate-pulse rounded-full bg-muted" />
</div>
<div className="h-5 w-44 animate-pulse rounded bg-muted" />
<div className="h-3.5 w-32 animate-pulse rounded bg-muted" />
<div className="grid grid-cols-3 gap-2 border-t border-border/50 pt-3">
<div className="h-8 animate-pulse rounded bg-muted/20" />
<div className="h-8 animate-pulse rounded bg-muted/20" />
<div className="h-8 animate-pulse rounded bg-muted/20" />
</div>
</div>
</div>
))}
</div>
</div>
);
}