"use client"; import dynamic from "next/dynamic"; import { Activity, AlertTriangle, Bell, BellRing, Bug, Clock, Cog, Database, Globe, Key, Loader2, RotateCw, Server, Users, } from "lucide-react"; import { Button } from "@/components/ui/button"; import { formatDateTime } from "@/lib/format"; import { useFormatters, useTranslations } from "@/lib/i18n/context"; import { StatusItem, useSystemStatus } from "./_shared"; // v1.4.16 phase B3: Recharts is ~108 KiB Brotli — defer-load the host // metrics chart so the system-status page only ships it when an admin // actually opens this view. Splitting at the wrapper boundary (instead // of per-primitive) keeps Recharts' `findAllByType` reconciliation // working — same pattern the insights page uses for the scatter chart. const HostMetricsChart = dynamic( () => import("./host-metrics-chart").then((mod) => ({ default: mod.HostMetricsChart, })), { ssr: false, loading: () => (
), }, ); export function SystemStatusSection() { const { t } = useTranslations(); const fmt = useFormatters(); const { data: status, isError, refetch, isFetching } = useSystemStatus(); return (