From d1cdd99ae1dd61c0bcddd1ba0dc9994af1f4796a Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 15 Aug 2024 11:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index f01f485..4223ad6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -153,6 +153,11 @@ const App: React.FC = () => { } storage.setItem('stateInfo', JSON.stringify(state)) }, [state]) + useEffect(() => { + if (location.href.indexOf('/login') === 1) { + onStop() + } + }, [navigate]) const handleResize = (): void => { setWindowSize({ width: window.innerWidth, @@ -193,7 +198,6 @@ const App: React.FC = () => { const toSrc = (path: string): void => { switch (path) { case '/login': - onStop() window.electron.setMainWindowSize({ width: 752, height: 520,