From a211fc7c975209d031bda202e428f93e5a28c930 Mon Sep 17 00:00:00 2001 From: GyDi Date: Fri, 11 Nov 2022 22:45:32 +0800 Subject: [PATCH] fix: something --- src/pages/_layout.tsx | 1 + src/pages/proxies.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx index f00ed96..b319897 100644 --- a/src/pages/_layout.tsx +++ b/src/pages/_layout.tsx @@ -54,6 +54,7 @@ const Layout = () => { // the clash info may be updated await getAxios(true); mutate("getProxies"); + mutate("getVersion"); mutate("getClashConfig"); }); diff --git a/src/pages/proxies.tsx b/src/pages/proxies.tsx index dde730b..ca5bc99 100644 --- a/src/pages/proxies.tsx +++ b/src/pages/proxies.tsx @@ -42,7 +42,7 @@ const ProxyPage = () => { // 仅mode为全局和直连的时候展示global分组 const displayGroups = useMemo(() => { if (!global) return groups; - if (curMode === "global" || curMode === "direct") + if (curMode === "global" || curMode === "direct" || groups.length === 0) return [global, ...groups]; return groups; }, [global, groups, curMode]);