import { useEffect } from 'react' import { HeaderPanel } from '@/components/HeaderPanel' import { TimelinePanel } from '@/components/TimelinePanel' import { ForcePanel } from '@/components/ForcePanel' import { WarMap } from '@/components/WarMap' import { CombatLossesPanel } from '@/components/CombatLossesPanel' import { IranBaseStatusPanel } from '@/components/IranBaseStatusPanel' import { BaseStatusPanel } from '@/components/BaseStatusPanel' import { PowerChart } from '@/components/PowerChart' import { InvestmentTrendChart } from '@/components/InvestmentTrendChart' import { RetaliationGauge } from '@/components/RetaliationGauge' import { useSituationStore } from '@/store/situationStore' import { useReplaySituation } from '@/hooks/useReplaySituation' import { fetchAndSetSituation, startSituationWebSocket, stopSituationWebSocket } from '@/store/situationStore' export function Dashboard() { const situation = useReplaySituation() const isLoading = useSituationStore((s) => s.isLoading) const lastError = useSituationStore((s) => s.lastError) useEffect(() => { fetchAndSetSituation().finally(() => startSituationWebSocket()) return () => stopSituationWebSocket() }, []) return (