Remove dashboard prewarm requests

This commit is contained in:
2569718930@qq.com
2026-04-15 15:51:08 +08:00
parent aa6ed30987
commit c55b83a134
3 changed files with 7 additions and 214 deletions
+1 -13
View File
@@ -5,7 +5,7 @@ import clsx from "clsx";
import { useRouter } from "next/navigation";
import { useEffect, useMemo, useRef, useState } from "react";
import { ForecastTable } from "@/components/dashboard/PanelSections";
import { preloadChartJs, useChart } from "@/hooks/useChart";
import { useChart } from "@/hooks/useChart";
import { useDashboardStore } from "@/hooks/useDashboardStore";
import { useI18n } from "@/hooks/useI18n";
import { getOfficialSourceLinks } from "@/lib/dashboard-official-sources";
@@ -360,12 +360,6 @@ export function DetailPanel() {
: `${t("detail.todayAnalysis")} (Pro)`
}
onClick={() => handleFeatureAccess("today")}
onFocus={() => {
void preloadChartJs();
}}
onMouseEnter={() => {
void preloadChartJs();
}}
disabled={!store.selectedCity}
>
{isPro
@@ -379,12 +373,6 @@ export function DetailPanel() {
isPro ? t("detail.history") : `${t("detail.history")} (Pro)`
}
onClick={() => handleFeatureAccess("history")}
onFocus={() => {
void preloadChartJs();
}}
onMouseEnter={() => {
void preloadChartJs();
}}
disabled={!store.selectedCity}
>
{isPro ? t("detail.history") : `${t("detail.history")} · Pro`}