import { Skeleton } from "~/components/ui/skeleton"
import { Card, CardContent } from "~/components/ui/card"
/** Layout-preserving placeholder for a list/table surface. Renders a
* header bar + `rows` row skeletons. Looks far less alarming than a
* single spinner during slow loads and keeps the layout from jumping
* when data lands. */
export function ListSkeleton({ rows = 8 }: { rows?: number }) {
return (
{Array.from({ length: rows }).map((_, i) => (
))}
)
}
/** Layout-preserving placeholder for a dashboard/overview surface. Mirrors
* a hero KPI + secondary KPIs, a trend + categories row, a forecast strip
* and a list card so there's no visible reshuffle when data lands. Shape
* it to match whatever your overview renders. */
export function DashboardSkeleton() {
return (
{/* Hero KPI row */}
{/* Trend + categories */}
{Array.from({ length: 4 }).map((_, i) => (
))}
{/* Forecast */}
{Array.from({ length: 3 }).map((_, i) => (
))}
)
}