mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: refresh proxies interval, close #235
This commit is contained in:
parent
6e1a627b84
commit
cc5b33a8ec
|
@ -13,7 +13,9 @@ import ProxyGroup from "@/components/proxy/proxy-group";
|
|||
const ProxyPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { mutate } = useSWRConfig();
|
||||
const { data: proxiesData } = useSWR("getProxies", getProxies);
|
||||
const { data: proxiesData } = useSWR("getProxies", getProxies, {
|
||||
refreshInterval: 45000, // 45s
|
||||
});
|
||||
const { data: clashConfig } = useSWR("getClashConfig", getClashConfig);
|
||||
|
||||
const modeList = ["rule", "global", "direct", "script"];
|
||||
|
@ -37,6 +39,7 @@ const ProxyPage = () => {
|
|||
mutate("getClashConfig");
|
||||
});
|
||||
|
||||
// 仅mode为全局和直连的时候展示global分组
|
||||
const displayGroups = useMemo(() => {
|
||||
if (!global) return groups;
|
||||
if (curMode === "global" || curMode === "direct")
|
||||
|
|
Loading…
Reference in New Issue
Block a user