From 961cc802b2509bd88459c4bcf6881d93b73b0674 Mon Sep 17 00:00:00 2001 From: XYenon Date: Wed, 24 Dec 2025 00:18:44 +0800 Subject: [PATCH] fix: address PR review feedback - Use unique ID prefix for clipPath to avoid duplicate ID issues - Add cleanup function to initializeTheme to prevent memory leak - Change tooltip to show action description instead of current theme name --- src/App.tsx | 3 ++- src/components/layout/MainLayout.tsx | 6 +++--- src/stores/useThemeStore.ts | 27 +++++++++++++++++---------- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 0d1f1df..15562c6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -31,10 +31,11 @@ function App() { const [authReady, setAuthReady] = useState(false); useEffect(() => { - initializeTheme(); + const cleanupTheme = initializeTheme(); void restoreSession().finally(() => { setAuthReady(true); }); + return cleanupTheme; }, [initializeTheme, restoreSession]); useEffect(() => { diff --git a/src/components/layout/MainLayout.tsx b/src/components/layout/MainLayout.tsx index 28f2b01..b132e6d 100644 --- a/src/components/layout/MainLayout.tsx +++ b/src/components/layout/MainLayout.tsx @@ -119,12 +119,12 @@ const headerIcons = { autoTheme: ( - + - + @@ -469,7 +469,7 @@ export function MainLayout() { -