feat(ui): replace skeleton loaders with honest loading states
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import { EventStreamProvider } from '@/contexts/EventStreamContext'
|
||||
import type { FleetDevice } from '@/lib/api'
|
||||
import { AppLayout } from '@/components/layout/AppLayout'
|
||||
import { PageTransition } from '@/components/layout/PageTransition'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { LoadingText } from '@/components/ui/skeleton'
|
||||
import { ErrorBoundary } from '@/components/ui/error-boundary'
|
||||
|
||||
export const Route = createFileRoute('/_authenticated')({
|
||||
@@ -164,11 +164,7 @@ function AuthenticatedLayout() {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen bg-background">
|
||||
<div className="space-y-4 w-64">
|
||||
<Skeleton className="h-8 w-48 mx-auto" />
|
||||
<Skeleton className="h-4 w-full" />
|
||||
<Skeleton className="h-4 w-3/4" />
|
||||
</div>
|
||||
<LoadingText />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ function DeviceAlertsSection({
|
||||
const resolvedAlerts = alerts.filter((a) => a.status === 'resolved').slice(0, 5)
|
||||
|
||||
if (isLoading) {
|
||||
return <TableSkeleton rows={3} />
|
||||
return <TableSkeleton />
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -23,7 +23,7 @@ function TenantDetailPage() {
|
||||
})
|
||||
|
||||
if (isLoading) {
|
||||
return <CardGridSkeleton cards={3} />
|
||||
return <CardGridSkeleton />
|
||||
}
|
||||
|
||||
if (!tenant) {
|
||||
|
||||
@@ -26,9 +26,8 @@ function SiteDetailPage() {
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="animate-pulse space-y-4">
|
||||
<div className="h-6 w-48 bg-elevated rounded" />
|
||||
<div className="h-4 w-64 bg-elevated rounded" />
|
||||
<div className="py-8 text-center">
|
||||
<span className="text-[9px] text-text-muted">Loading…</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user