import { Fragment } from "react" /** Compact RX/TX history shared by traffic cards. Gaps remain gaps. */ export function TrafficMiniChart({ rx, tx, height = 44 }: { rx: (number|null)[]; tx: (number|null)[]; height?: number }) { const valid = (value: number|null): value is number => value !== null && Number.isFinite(value) && value >= 0 const values = [...rx, ...tx].filter(valid) if (!values.length) return
Нет истории трафика
const width = 300 const count = Math.max(rx.length, tx.length) const max = Math.max(...values, 1) * 1.1 const segments = (series: (number|null)[]) => { const result: Array