Dashboard Refactor: Flow-based Metrics + Unified Data Model #4

Merged
aetos merged 11 commits from cached-reports into main 2026-05-18 05:37:52 +00:00
Showing only changes of commit fe94249b02 - Show all commits

View File

@@ -15,16 +15,16 @@ export default function Dashboard(props: DashboardProps) {
event: React.MouseEvent<HTMLElement>, event: React.MouseEvent<HTMLElement>,
newFlow: "outflows" | "inflows" | null newFlow: "outflows" | "inflows" | null
) => { ) => {
if (newFlow !== null && newFlow !== state.flow) { if (newFlow === null) return;
setState(prev => {
const next = { setState(prev => {
...prev, if (prev.flow === newFlow) return prev;
flow: newFlow,
}; const next = { ...prev, flow: newFlow };
props.onFlowChange?.(next); props.onFlowChange?.(next);
return next;
}); return next;
} });
}; };
const togglePeriodType = () => { const togglePeriodType = () => {