diff --git a/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx b/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx index 030e7bca..b78d8501 100644 --- a/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx +++ b/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx @@ -2,7 +2,6 @@ import clsx from "clsx"; import { useEffect, useMemo, useState } from "react"; -import { LoadingSignal } from "@/components/dashboard/scan-terminal/LoadingSignal"; import { CartesianGrid, Line, @@ -1155,7 +1154,6 @@ export function LiveTemperatureThresholdChart({ slotIndex?: number; }) { const [hourly, setHourly] = useState(null); - const [isFetching, setIsFetching] = useState(false); const city = String(row?.city || "").toLowerCase().trim(); const [timeframe, setTimeframe] = useState<"1D" | "3D">("1D"); const [userToggledKeys, setUserToggledKeys] = useState>({}); @@ -1181,12 +1179,10 @@ export function LiveTemperatureThresholdChart({ if (cached && Date.now() - cached.ts < HOURLY_CACHE_TTL_MS) { setHourly(cached.data); - setIsFetching(false); return; } setHourly(seedHourlyForecastFromRow(row)); - setIsFetching(true); let cancelled = false; // Prioritize active slots, stagger/delay background slots to optimize load performance @@ -1197,11 +1193,8 @@ export function LiveTemperatureThresholdChart({ .then((data) => { if (cancelled || !data) return; setHourly(data); - setIsFetching(false); }) - .catch(() => { - if (!cancelled) setIsFetching(false); - }); + .catch(() => {}); }, delay); return () => { @@ -1488,16 +1481,7 @@ export function LiveTemperatureThresholdChart({ ); return ( - - {isFetching && ( -
- -
- )} +
{/* Compact stats bar */} {compact ? (