"use client"; import { DataArtifact } from "@/components/data-artifact"; import { useT } from "@/components/locale-provider"; /** * Shared loading / empty / error states for the 0pt portal. * Mono, square, radius 0. One red accent per screen, used at most once * (the single EmptyState CTA). No fetching here — pure presentation. * * LoadingSkeleton: hairline rows with a slow left-to-right sweep (not pulsing * blobs). EmptyState: centered, generous air, faint DataArtifact "grid" motif. * ErrorState: terse interface voice + "Försök igen". */ /** Hairline shimmer rows — a slow sweep travels left→right across each bar. */ export function LoadingSkeleton({ rows = 5 }: { rows?: number }) { const t = useT(); return (
{t({ en: "error", sv: "fel" })}
{t({ en: "Couldn't fetch data. No changes were saved.", sv: "Kunde inte hämta data. Ingen ändring sparad." })}
{onRetry ? ( ) : null}