import { useGameStore } from '@/store'; import { formatMoney, formatNumber, formatFlops, formatPercent } from '@token-empire/shared'; function Section({ title, children }: { title: string; children: React.ReactNode }) { return (
{title}
{children}
); } function Stat({ label, value }: { label: string; value: string | number }) { return ( <> {label} {value} ); } export function StateInspectionTab() { const meta = useGameStore((s) => s.meta); const economy = useGameStore((s) => s.economy); const compute = useGameStore((s) => s.compute); const market = useGameStore((s) => s.market); const infrastructure = useGameStore((s) => s.infrastructure); const reputation = useGameStore((s) => s.reputation); const research = useGameStore((s) => s.research); const models = useGameStore((s) => s.models); const totalFailedRacks = infrastructure.clusters.reduce((sum, cl) => sum + cl.campuses.reduce((s2, ca) => s2 + ca.dataCenters.reduce((s3, dc) => s3 + dc.computeRacksFailed, 0), 0), 0); const totalOnlineRacks = infrastructure.clusters.reduce((sum, cl) => sum + cl.campuses.reduce((s2, ca) => s2 + ca.dataCenters.reduce((s3, dc) => s3 + dc.computeRacksOnline, 0), 0), 0); const pipelineRacks = infrastructure.clusters.reduce((sum, cl) => sum + cl.campuses.reduce((s2, ca) => s2 + ca.dataCenters.reduce((s3, dc) => s3 + dc.deploymentCohorts.reduce((s4, co) => s4 + co.count, 0), 0), 0), 0); return (
p.status === 'active').length} /> m.isDeployed).length} />
); }