import React from "react"; import { Network, Wifi, WifiOff } from "lucide-react"; import { useTranslation } from "react-i18next"; import type { ServerMetrics } from "@/ui/main-axios.ts"; interface NetworkWidgetProps { metrics: ServerMetrics | null; metricsHistory: ServerMetrics[]; } export function NetworkWidget({ metrics }: NetworkWidgetProps) { const { t } = useTranslation(); const metricsWithNetwork = metrics as ServerMetrics & { network?: { interfaces?: Array<{ name: string; state: string; ip: string; }>; }; }; const network = metricsWithNetwork?.network; const interfaces = network?.interfaces || []; return (
{t("serverStats.noInterfacesFound")}