'use client' import { usePathname } from 'next/navigation' import { Skeleton } from '@/components/ui/skeleton' /** * Shared loading fallback for the dashboard segment. It is the Suspense * fallback for Hem (app/(dashboard)/page.tsx) and for every child route that * has no loading.tsx of its own, so it deliberately mirrors Hem's silhouette: * a greeting hero (H1 + date line) followed by a single "Att göra"-style pane * of list rows (see DashboardContent / AttGoraSection). * * A greeting + hairline-separated rows reads honestly on Hem and stays neutral * on the plain list pages that fall back here (a page title + rows), which is * why it is not shaped like any one page's specific grid. * * /chat is the exception: MainContainer renders it full-bleed (no max-width, * no padding), so the column silhouette would stretch edge-to-edge and read * broken. The chat branch mirrors the two-pane chat shell instead: * conversation sidebar + empty conversation pane (see ChatLayout/ChatSidebar). */ export default function DashboardLoading() { const pathname = usePathname() if (pathname.startsWith('/chat')) { return (