"use client"; import { Network, RefreshCw } from "lucide-react"; import { Button } from "@/components/ui/button"; import { PageHeader, PageShell, StatePanel } from "@/components/page-layout"; import { TopologyCanvas } from "@/components/topology/topology-canvas"; import { useTopologyData } from "@/hooks/use-topology-data"; export default function TopologyPage() { const { graph, loading, error, refreshing, refresh } = useTopologyData(); const header = ( } /> ); return ( {header} {loading ? ( ) : error && !graph ? (

{error}

Auto-retrying...

} tone="error" className="h-[70vh] sm:h-[calc(100vh-250px)]" action={} /> ) : !graph || graph.nodes.length === 0 ? ( ) : (
{error && (
Refresh failed: {error}. Showing the last successful topology.
)}
)}
); }