diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8ee7510..4e28b0b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2,7 +2,7 @@ import { RouterProvider, createRouter } from '@tanstack/react-router' import { useEffect, useState } from 'react' import { routeTree } from './routeTree.gen' import { useAuth } from './lib/auth' -import { Skeleton } from './components/ui/skeleton' +import { LoadingText } from './components/ui/skeleton' const router = createRouter({ routeTree, @@ -24,17 +24,13 @@ function AppInner() { // eslint-disable-next-line react-hooks/exhaustive-deps }, []) - // Only show skeleton during initial auth check -- NOT on subsequent isLoading changes. + // Only show loading text during initial auth check -- NOT on subsequent isLoading changes. // Reacting to isLoading here would unmount the entire router tree (including LoginPage) // every time an auth action sets isLoading, destroying all component local state. if (!hasChecked) { return (
-
- - - -
+
) } diff --git a/frontend/src/components/certificates/CertificatesPage.tsx b/frontend/src/components/certificates/CertificatesPage.tsx index c9b4a80..386039c 100644 --- a/frontend/src/components/certificates/CertificatesPage.tsx +++ b/frontend/src/components/certificates/CertificatesPage.tsx @@ -74,7 +74,7 @@ export function CertificatesPage() { Certificate Authority - + ) } diff --git a/frontend/src/components/certificates/DeviceCertTable.tsx b/frontend/src/components/certificates/DeviceCertTable.tsx index 02c30d1..f25bca5 100644 --- a/frontend/src/components/certificates/DeviceCertTable.tsx +++ b/frontend/src/components/certificates/DeviceCertTable.tsx @@ -189,7 +189,7 @@ export function DeviceCertTable({ } if (loading) { - return + return } return ( diff --git a/frontend/src/components/config-editor/EntryTable.tsx b/frontend/src/components/config-editor/EntryTable.tsx index f33baba..7e72629 100644 --- a/frontend/src/components/config-editor/EntryTable.tsx +++ b/frontend/src/components/config-editor/EntryTable.tsx @@ -64,14 +64,8 @@ export function EntryTable({ if (isLoading) { return ( -
-
-
-
-
- {Array.from({ length: 5 }).map((_, i) => ( -
- ))} +
+ Loading…
) } diff --git a/frontend/src/components/config/BatchConfigPanel.tsx b/frontend/src/components/config/BatchConfigPanel.tsx index d2cb34c..649dfe2 100644 --- a/frontend/src/components/config/BatchConfigPanel.tsx +++ b/frontend/src/components/config/BatchConfigPanel.tsx @@ -180,7 +180,7 @@ function DeviceSelector({ onSelectionChange(new Set()) } - if (isLoading) return + if (isLoading) return if (devices.length === 0) { return ( diff --git a/frontend/src/components/config/ConfigDiffViewer.tsx b/frontend/src/components/config/ConfigDiffViewer.tsx index 78ab3d0..17d016a 100644 --- a/frontend/src/components/config/ConfigDiffViewer.tsx +++ b/frontend/src/components/config/ConfigDiffViewer.tsx @@ -126,8 +126,8 @@ export function ConfigDiffViewer({ {/* Diff content */} {isLoading ? ( -
- Loading diff... +
+ Loading…
) : !diffFile ? (
diff --git a/frontend/src/components/config/ConfigHistorySection.tsx b/frontend/src/components/config/ConfigHistorySection.tsx index 2ddc6a7..ce0fc6b 100644 --- a/frontend/src/components/config/ConfigHistorySection.tsx +++ b/frontend/src/components/config/ConfigHistorySection.tsx @@ -83,7 +83,7 @@ export function ConfigHistorySection({ tenantId, deviceId, deviceName }: ConfigH )} {isLoading ? ( - + ) : !changes || changes.length === 0 ? (
No configuration changes recorded yet. diff --git a/frontend/src/components/config/ConfigTab.tsx b/frontend/src/components/config/ConfigTab.tsx index 0c03bfd..7b86620 100644 --- a/frontend/src/components/config/ConfigTab.tsx +++ b/frontend/src/components/config/ConfigTab.tsx @@ -158,13 +158,8 @@ export function ConfigTab({ {/* Timeline panel */}
{isLoading ? ( -
- {[0, 1, 2].map((i) => ( -
- ))} +
+ Loading…
) : !backups || backups.length === 0 ? (
diff --git a/frontend/src/components/config/DiffViewer.tsx b/frontend/src/components/config/DiffViewer.tsx index 52f50ae..bd8e6db 100644 --- a/frontend/src/components/config/DiffViewer.tsx +++ b/frontend/src/components/config/DiffViewer.tsx @@ -47,10 +47,8 @@ export function DiffViewer({ tenantId, deviceId, snapshotId, onClose }: DiffView {/* Content */} {isLoading ? ( -
- {[75, 90, 65, 85, 70, 80].map((w, i) => ( -
- ))} +
+ Loading…
) : isError || !diff ? (
diff --git a/frontend/src/components/config/FirewallPanel.tsx b/frontend/src/components/config/FirewallPanel.tsx index e00ba5c..7b87341 100644 --- a/frontend/src/components/config/FirewallPanel.tsx +++ b/frontend/src/components/config/FirewallPanel.tsx @@ -23,7 +23,7 @@ import { Badge } from '@/components/ui/badge' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Checkbox } from '@/components/ui/checkbox' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' import { Dialog, DialogContent, @@ -1340,16 +1340,10 @@ function CellEmpty() { function LoadingRows({ cols }: { cols: number }) { return ( - <> - {Array.from({ length: 5 }).map((_, i) => ( - - {Array.from({ length: cols }).map((_, j) => ( - - - - ))} - - ))} - + + + + + ) } diff --git a/frontend/src/components/config/InterfacesPanel.tsx b/frontend/src/components/config/InterfacesPanel.tsx index 62f6ed7..1052b55 100644 --- a/frontend/src/components/config/InterfacesPanel.tsx +++ b/frontend/src/components/config/InterfacesPanel.tsx @@ -24,7 +24,7 @@ import { Badge } from '@/components/ui/badge' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Checkbox } from '@/components/ui/checkbox' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' import { Select, SelectContent, @@ -228,23 +228,13 @@ export function InterfacesPanel({ tenantId, deviceId, active }: ConfigPanelProps } // --------------------------------------------------------------------------- -// Loading skeleton +// Loading state // --------------------------------------------------------------------------- -function TableSkeleton({ rows = 5 }: { rows?: number }) { +function TableLoading() { return ( -
-
- -
- {Array.from({ length: rows }).map((_, i) => ( -
- - - - -
- ))} +
+
) } @@ -260,7 +250,7 @@ function InterfacesTable({ entries: Record[] isLoading: boolean }) { - if (isLoading) return + if (isLoading) return if (entries.length === 0) { return ( @@ -362,7 +352,7 @@ function IpAddressesTab({ entries, isLoading, interfaceNames, addChange }: IpAdd }) } - if (isLoading) return + if (isLoading) return return (
@@ -621,7 +611,7 @@ function VlansTab({ entries, isLoading, interfaceNames, addChange }: VlansTabPro }) } - if (isLoading) return + if (isLoading) return return (
@@ -926,7 +916,7 @@ function BridgesTab({ }) } - if (isLoading) return + if (isLoading) return return (
diff --git a/frontend/src/components/config/RestorePreview.tsx b/frontend/src/components/config/RestorePreview.tsx index 9a1a4b2..8d38146 100644 --- a/frontend/src/components/config/RestorePreview.tsx +++ b/frontend/src/components/config/RestorePreview.tsx @@ -52,10 +52,8 @@ export function RestorePreview({ if (isLoading) { return ( -
-
-
-
+
+ Loading…
) } diff --git a/frontend/src/components/config/SwitchPortManager.tsx b/frontend/src/components/config/SwitchPortManager.tsx index 49368d5..0dcb9e0 100644 --- a/frontend/src/components/config/SwitchPortManager.tsx +++ b/frontend/src/components/config/SwitchPortManager.tsx @@ -10,7 +10,7 @@ import { useMemo } from 'react' import { Zap, Network } from 'lucide-react' import { Badge } from '@/components/ui/badge' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' import { useConfigBrowse } from '@/hooks/useConfigPanel' import type { ConfigPanelProps } from '@/lib/configPanelTypes' @@ -134,12 +134,8 @@ export function SwitchPortManager({ tenantId, deviceId, active }: ConfigPanelPro if (isLoading) { return ( -
-
- {Array.from({ length: 8 }).map((_, i) => ( - - ))} -
+
+
) } diff --git a/frontend/src/components/fleet/FleetDashboard.tsx b/frontend/src/components/fleet/FleetDashboard.tsx index eb9befb..7aae5b8 100644 --- a/frontend/src/components/fleet/FleetDashboard.tsx +++ b/frontend/src/components/fleet/FleetDashboard.tsx @@ -7,7 +7,7 @@ import { alertsApi } from '@/lib/alertsApi' import { useEventStreamContext } from '@/contexts/EventStreamContext' import { LayoutDashboard } from 'lucide-react' import { cn } from '@/lib/utils' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' import { EmptyState } from '@/components/ui/empty-state' // ─── Dashboard Widgets ─────────────────────────────────────────────────────── @@ -30,39 +30,12 @@ const REFRESH_OPTIONS: { label: string; value: RefreshInterval }[] = [ { label: 'Off', value: false }, ] -// ─── Dashboard Skeleton ────────────────────────────────────────────────────── +// ─── Dashboard Loading ─────────────────────────────────────────────────────── -function DashboardSkeleton() { +function DashboardLoading() { return ( -
- {/* KPI cards skeleton */} -
- {Array.from({ length: 4 }).map((_, i) => ( -
- - -
- ))} -
- {/* Widget grid skeleton */} -
-
- - -
-
- - -
-
- - -
-
- - -
-
+
+
) } @@ -236,7 +209,7 @@ export function FleetDashboard() { {/* ── Dashboard Content ───────────────────────────────────────────── */} {fleetLoading ? ( - + ) : totalDevices === 0 ? ( {isLoading ? ( - + ) : items.length === 0 ? ( - {[1, 2, 3].map((i) => ( -
- ))} +
+ Loading…
) } diff --git a/frontend/src/components/map/MapPage.tsx b/frontend/src/components/map/MapPage.tsx index d792280..8a88062 100644 --- a/frontend/src/components/map/MapPage.tsx +++ b/frontend/src/components/map/MapPage.tsx @@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query' import { MapPin } from 'lucide-react' import { metricsApi, tenantsApi } from '@/lib/api' import { useAuth, isSuperAdmin } from '@/lib/auth' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' import { FleetMap } from './FleetMap' export function MapPage() { @@ -55,7 +55,11 @@ export function MapPage() { }, [superAdmin, selectedTenant, user]) if (devicesLoading) { - return + return ( +
+ +
+ ) } if (devicesError) { diff --git a/frontend/src/components/monitoring/HealthTab.tsx b/frontend/src/components/monitoring/HealthTab.tsx index 8b10e35..9a678ac 100644 --- a/frontend/src/components/monitoring/HealthTab.tsx +++ b/frontend/src/components/monitoring/HealthTab.tsx @@ -41,10 +41,8 @@ export function HealthTab({ tenantId, deviceId, active = true }: HealthTabProps) /> {isLoading ? ( -
- {[0, 1, 2, 3].map((i) => ( -
- ))} +
+ Loading…
) : !data || data.length === 0 ? (
diff --git a/frontend/src/components/monitoring/InterfacesTab.tsx b/frontend/src/components/monitoring/InterfacesTab.tsx index 0e0b7a0..af86476 100644 --- a/frontend/src/components/monitoring/InterfacesTab.tsx +++ b/frontend/src/components/monitoring/InterfacesTab.tsx @@ -87,10 +87,8 @@ export function InterfacesTab({ tenantId, deviceId, active = true }: InterfacesT {/* Charts */} {isLoading ? ( -
- {[0, 1, 2].map((i) => ( -
- ))} +
+ Loading…
) : !trafficData || trafficData.length === 0 ? (
diff --git a/frontend/src/components/monitoring/WirelessTab.tsx b/frontend/src/components/monitoring/WirelessTab.tsx index 88582f0..583d2fa 100644 --- a/frontend/src/components/monitoring/WirelessTab.tsx +++ b/frontend/src/components/monitoring/WirelessTab.tsx @@ -159,10 +159,8 @@ export function WirelessTab({ tenantId, deviceId, active = true }: WirelessTabPr /> {isLoading ? ( -
- {[0, 1].map((i) => ( -
- ))} +
+ Loading…
) : hasNoWireless ? (
diff --git a/frontend/src/components/network/ClientsTab.tsx b/frontend/src/components/network/ClientsTab.tsx index 92e830d..446eedd 100644 --- a/frontend/src/components/network/ClientsTab.tsx +++ b/frontend/src/components/network/ClientsTab.tsx @@ -171,7 +171,7 @@ export function ClientsTab({ tenantId, deviceId, active }: ClientsTabProps) { // Loading state if (isLoading) { - return + return } // Error state diff --git a/frontend/src/components/network/InterfaceGauges.tsx b/frontend/src/components/network/InterfaceGauges.tsx index 8bfd0b7..554be9f 100644 --- a/frontend/src/components/network/InterfaceGauges.tsx +++ b/frontend/src/components/network/InterfaceGauges.tsx @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query' import { metricsApi, type InterfaceMetricPoint } from '@/lib/api' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' interface InterfaceGaugesProps { tenantId: string @@ -101,14 +101,8 @@ export function InterfaceGauges({ tenantId, deviceId, active }: InterfaceGaugesP if (isLoading) { return ( -
- {[0, 1, 2].map((i) => ( -
- - - -
- ))} +
+
) } diff --git a/frontend/src/components/network/LogsTab.tsx b/frontend/src/components/network/LogsTab.tsx index f2c0d79..2d10b93 100644 --- a/frontend/src/components/network/LogsTab.tsx +++ b/frontend/src/components/network/LogsTab.tsx @@ -2,7 +2,7 @@ import { useState, useMemo, useCallback, useRef, useEffect } from 'react' import { useQuery } from '@tanstack/react-query' import { Search, RefreshCw } from 'lucide-react' import { networkApi, type LogEntry } from '@/lib/networkApi' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' interface LogsTabProps { tenantId: string @@ -62,16 +62,10 @@ function TopicBadge({ topics }: { topics: string }) { ) } -function TableSkeleton() { +function TableLoading() { return ( -
- {Array.from({ length: 8 }).map((_, i) => ( -
- - - -
- ))} +
+
) } @@ -189,7 +183,7 @@ export function LogsTab({ tenantId, deviceId, active }: LogsTabProps) { {/* Log table */}
{isLoading ? ( - + ) : error ? (
Failed to fetch device logs. The device may be offline or unreachable. diff --git a/frontend/src/components/network/VpnTab.tsx b/frontend/src/components/network/VpnTab.tsx index d40597d..f51baac 100644 --- a/frontend/src/components/network/VpnTab.tsx +++ b/frontend/src/components/network/VpnTab.tsx @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query' import { Shield, Lock, Globe } from 'lucide-react' import { networkApi, type VpnTunnel } from '@/lib/networkApi' -import { Skeleton } from '@/components/ui/skeleton' +import { LoadingText } from '@/components/ui/skeleton' import { Badge } from '@/components/ui/badge' interface VpnTabProps { @@ -102,10 +102,8 @@ export function VpnTab({ tenantId, deviceId, active }: VpnTabProps) { if (isLoading) { return ( -
- - - +
+
) } diff --git a/frontend/src/components/operations/BulkCommandWizard.tsx b/frontend/src/components/operations/BulkCommandWizard.tsx index 129ae59..1f54033 100644 --- a/frontend/src/components/operations/BulkCommandWizard.tsx +++ b/frontend/src/components/operations/BulkCommandWizard.tsx @@ -611,7 +611,7 @@ function DeviceSelectionStep({ } if (devicesLoading) { - return + return } return ( diff --git a/frontend/src/components/simple-config/SimpleStatusBanner.tsx b/frontend/src/components/simple-config/SimpleStatusBanner.tsx index 912941f..acb5f9f 100644 --- a/frontend/src/components/simple-config/SimpleStatusBanner.tsx +++ b/frontend/src/components/simple-config/SimpleStatusBanner.tsx @@ -16,7 +16,7 @@ export function SimpleStatusBanner({ items, isLoading }: SimpleStatusBannerProps
{item.label} {isLoading ? ( -
+ Loading… ) : ( {item.value || '\u2014'} diff --git a/frontend/src/components/sites/SiteHealthGrid.tsx b/frontend/src/components/sites/SiteHealthGrid.tsx index bd4e46d..f08273d 100644 --- a/frontend/src/components/sites/SiteHealthGrid.tsx +++ b/frontend/src/components/sites/SiteHealthGrid.tsx @@ -57,15 +57,8 @@ export function SiteHealthGrid({ tenantId, siteId }: SiteHealthGridProps) { if (devicesLoading) { return ( -
- {Array.from({ length: 6 }).map((_, i) => ( -
-
-
-
-
-
- ))} +
+ Loading…
) } diff --git a/frontend/src/components/sites/SiteSectorView.tsx b/frontend/src/components/sites/SiteSectorView.tsx index 8447375..85cf03e 100644 --- a/frontend/src/components/sites/SiteSectorView.tsx +++ b/frontend/src/components/sites/SiteSectorView.tsx @@ -145,7 +145,7 @@ export function SiteSectorView({ tenantId, siteId }: SiteSectorViewProps) { }, [linksData]) if (sectorsLoading || devicesLoading) { - return + return } const sectors = sectorData?.items ?? [] diff --git a/frontend/src/components/sites/SiteTable.tsx b/frontend/src/components/sites/SiteTable.tsx index 3e875a4..99e3efa 100644 --- a/frontend/src/components/sites/SiteTable.tsx +++ b/frontend/src/components/sites/SiteTable.tsx @@ -99,7 +99,7 @@ export function SiteTable({ tenantId, search, onCreateClick, onEditClick }: Site } if (isLoading) { - return + return } if (!data || data.sites.length === 0) { diff --git a/frontend/src/components/tenants/TenantList.tsx b/frontend/src/components/tenants/TenantList.tsx index a30c482..ce488cd 100644 --- a/frontend/src/components/tenants/TenantList.tsx +++ b/frontend/src/components/tenants/TenantList.tsx @@ -74,7 +74,7 @@ export function TenantList() { {isLoading ? ( - + ) : tenants?.length === 0 ? ( diff --git a/frontend/src/components/ui/page-skeleton.tsx b/frontend/src/components/ui/page-skeleton.tsx index 4e6707b..2aeb964 100644 --- a/frontend/src/components/ui/page-skeleton.tsx +++ b/frontend/src/components/ui/page-skeleton.tsx @@ -1,84 +1,13 @@ -import { Skeleton } from './skeleton' +import { LoadingText } from './skeleton' -/** Table-style skeleton with header + rows */ -export function TableSkeleton({ rows = 8 }: { rows?: number }) { - return ( -
- {/* Header */} -
- - -
- {/* Filter bar */} -
- - -
- {/* Table header */} -
- - - - - -
- {/* Rows */} - {Array.from({ length: rows }).map((_, i) => ( -
- - - - - -
- ))} -
- ) +export function TableSkeleton() { + return
} -/** Card grid skeleton */ -export function CardGridSkeleton({ cards = 6 }: { cards?: number }) { - return ( -
- -
- {Array.from({ length: cards }).map((_, i) => ( -
- - - -
- ))} -
-
- ) +export function CardGridSkeleton() { + return
} -/** Detail page skeleton (header + tabs + content) */ export function DetailPageSkeleton() { - return ( -
-
- -
- - -
- -
- {/* Tabs */} -
- - - - -
- {/* Content area */} -
- - -
- -
- ) + return
} diff --git a/frontend/src/components/ui/skeleton.tsx b/frontend/src/components/ui/skeleton.tsx index 1ad8f36..634af0f 100644 --- a/frontend/src/components/ui/skeleton.tsx +++ b/frontend/src/components/ui/skeleton.tsx @@ -1,15 +1,11 @@ import { cn } from '@/lib/utils' -type SkeletonProps = React.HTMLAttributes - -export function Skeleton({ className, ...props }: SkeletonProps) { - return ( -
- ) +// Compatibility shim — returns null. Remove once all imports are cleaned up. +export function Skeleton({ className: _className }: { className?: string }) { + return null +} + +// Use this for panels where loading delay is noticeable +export function LoadingText({ text = 'Loading\u2026' }: { text?: string }) { + return {text} } diff --git a/frontend/src/components/users/UserList.tsx b/frontend/src/components/users/UserList.tsx index a452d84..66d3e45 100644 --- a/frontend/src/components/users/UserList.tsx +++ b/frontend/src/components/users/UserList.tsx @@ -91,7 +91,7 @@ export function UserList({ tenantId }: Props) { {isLoading ? ( - + ) : users?.length === 0 ? ( diff --git a/frontend/src/components/vpn/VpnPage.tsx b/frontend/src/components/vpn/VpnPage.tsx index 293dc17..72bf9ce 100644 --- a/frontend/src/components/vpn/VpnPage.tsx +++ b/frontend/src/components/vpn/VpnPage.tsx @@ -190,7 +190,7 @@ export function VpnPage() { return (

VPN

- +
) } @@ -309,7 +309,7 @@ export function VpnPage() { {/* Peer list */} {peersLoading ? ( - + ) : peers.length === 0 ? (
diff --git a/frontend/src/components/wireless/RFStatsCard.tsx b/frontend/src/components/wireless/RFStatsCard.tsx index 0ab772a..0151920 100644 --- a/frontend/src/components/wireless/RFStatsCard.tsx +++ b/frontend/src/components/wireless/RFStatsCard.tsx @@ -29,7 +29,7 @@ export function RFStatsCard({ tenantId, deviceId, active }: RFStatsCardProps) { }) if (isLoading) { - return + return } if (!data || data.items.length === 0) { diff --git a/frontend/src/components/wireless/WirelessLinksTable.tsx b/frontend/src/components/wireless/WirelessLinksTable.tsx index cd38031..f8046f2 100644 --- a/frontend/src/components/wireless/WirelessLinksTable.tsx +++ b/frontend/src/components/wireless/WirelessLinksTable.tsx @@ -88,7 +88,7 @@ export function WirelessLinksTable({ tenantId, siteId }: WirelessLinksTableProps }, [data]) if (isLoading) { - return + return } if (!data || data.items.length === 0) { diff --git a/frontend/src/components/wireless/WirelessStationTable.tsx b/frontend/src/components/wireless/WirelessStationTable.tsx index 7ee280d..00a6e74 100644 --- a/frontend/src/components/wireless/WirelessStationTable.tsx +++ b/frontend/src/components/wireless/WirelessStationTable.tsx @@ -44,7 +44,7 @@ export function WirelessStationTable({ tenantId, deviceId, active }: WirelessSta }) if (isLoading) { - return + return } if (!data || data.items.length === 0) { diff --git a/frontend/src/routes/_authenticated.tsx b/frontend/src/routes/_authenticated.tsx index 6f20a43..3cded92 100644 --- a/frontend/src/routes/_authenticated.tsx +++ b/frontend/src/routes/_authenticated.tsx @@ -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 (
-
- - - -
+
) } diff --git a/frontend/src/routes/_authenticated/tenants/$tenantId/devices/$deviceId.tsx b/frontend/src/routes/_authenticated/tenants/$tenantId/devices/$deviceId.tsx index 2cef294..9ba6f11 100644 --- a/frontend/src/routes/_authenticated/tenants/$tenantId/devices/$deviceId.tsx +++ b/frontend/src/routes/_authenticated/tenants/$tenantId/devices/$deviceId.tsx @@ -800,7 +800,7 @@ function DeviceAlertsSection({ const resolvedAlerts = alerts.filter((a) => a.status === 'resolved').slice(0, 5) if (isLoading) { - return + return } return ( diff --git a/frontend/src/routes/_authenticated/tenants/$tenantId/index.tsx b/frontend/src/routes/_authenticated/tenants/$tenantId/index.tsx index 8cd46b0..73126af 100644 --- a/frontend/src/routes/_authenticated/tenants/$tenantId/index.tsx +++ b/frontend/src/routes/_authenticated/tenants/$tenantId/index.tsx @@ -23,7 +23,7 @@ function TenantDetailPage() { }) if (isLoading) { - return + return } if (!tenant) { diff --git a/frontend/src/routes/_authenticated/tenants/$tenantId/sites/$siteId.tsx b/frontend/src/routes/_authenticated/tenants/$tenantId/sites/$siteId.tsx index c7c5409..f109746 100644 --- a/frontend/src/routes/_authenticated/tenants/$tenantId/sites/$siteId.tsx +++ b/frontend/src/routes/_authenticated/tenants/$tenantId/sites/$siteId.tsx @@ -26,9 +26,8 @@ function SiteDetailPage() { if (isLoading) { return ( -
-
-
+
+ Loading…
) }