perf: improve Clash mode switch responsiveness on home card

This commit is contained in:
wonfen
2025-03-23 04:54:18 +08:00
parent d669650758
commit 970eb62aa6
3 changed files with 38 additions and 39 deletions

View File

@@ -16,6 +16,12 @@ const ProxyPage = () => {
const { data: clashConfig, mutate: mutateClash } = useSWR(
"getClashConfig",
getClashConfig,
{
revalidateOnFocus: false,
revalidateIfStale: true,
dedupingInterval: 1000,
errorRetryInterval: 5000
}
);
const { verge } = useVerge();