From 29f8fe75f30caf8aca1fe370ad2998d3d62ce552 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Sat, 4 Mar 2023 12:23:16 +0800 Subject: [PATCH] fix: theme switcher --- .../Menu/MenuOptions/ThemeSwitcher.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/Menu/MenuOptions/ThemeSwitcher.tsx b/src/components/Menu/MenuOptions/ThemeSwitcher.tsx index 5f055d3..edf3995 100644 --- a/src/components/Menu/MenuOptions/ThemeSwitcher.tsx +++ b/src/components/Menu/MenuOptions/ThemeSwitcher.tsx @@ -34,18 +34,18 @@ const ThemeSwitcher = () => { } }, [theme]); - return ( - theme && ( - - {theme === 'dark' ? : } - {getOppositeTheme(theme).charAt(0).toUpperCase() + - getOppositeTheme(theme).slice(1)}{' '} - mode - - ) + return theme ? ( + + {theme === 'dark' ? : } + {getOppositeTheme(theme).charAt(0).toUpperCase() + + getOppositeTheme(theme).slice(1)}{' '} + mode + + ) : ( + <> ); };