From 77488e561a0281eb26f675b63d987e979b90c75f Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Fri, 15 May 2026 04:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E9=81=93=E8=A7=82=E6=B5=8B=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=AF=8F=2060=20=E7=A7=92=E8=87=AA=E5=8A=A8=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E8=A7=82=E6=B5=8B=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scan-terminal/RunwayObservationsPanel.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/components/dashboard/scan-terminal/RunwayObservationsPanel.tsx b/frontend/components/dashboard/scan-terminal/RunwayObservationsPanel.tsx index 700655e6..b558f388 100644 --- a/frontend/components/dashboard/scan-terminal/RunwayObservationsPanel.tsx +++ b/frontend/components/dashboard/scan-terminal/RunwayObservationsPanel.tsx @@ -1,6 +1,6 @@ "use client"; -import { useCallback, useEffect, useMemo } from "react"; +import { useCallback, useEffect, useMemo, useRef } from "react"; import { useCityDetails, useDashboardActions } from "@/hooks/useDashboardStore"; import { useI18n } from "@/hooks/useI18n"; import type { CityDetail } from "@/lib/dashboard-types"; @@ -117,9 +117,21 @@ export function RunwayObservationsPanel() { [ensureCityDetail], ); + const intervalRef = useRef | null>(null); + useEffect(() => { void loadAll(); - }, [loadAll]); + intervalRef.current = setInterval(() => { + void Promise.allSettled( + CHINA_RUNWAY_CITIES.map((city) => + ensureCityDetail(city.key, true, "panel"), + ), + ); + }, 60_000); + return () => { + if (intervalRef.current) clearInterval(intervalRef.current); + }; + }, [loadAll, ensureCityDetail]); const cards = useMemo( () =>