From cdffb159f9b18e28485f98fd7b8185141de50210 Mon Sep 17 00:00:00 2001 From: "lalitdeore12@gmail.com" Date: Tue, 3 Jun 2025 14:09:28 +0530 Subject: [PATCH] if not login then show dark theme --- frontend/src/App.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 7f110c98..13289352 100755 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -92,7 +92,7 @@ const App = (message, props) => { const [dataset, setDataset] = useState(false) const [isLoaded, setIsLoaded] = useState(false) const [curpath, setCurpath] = useState(typeof window === "undefined" || window.location === undefined ? "" : window.location.pathname) - const { themeMode, handleThemeChange, setBrandColor, brandColor} = useContext(Context); + const { themeMode, handleThemeChange, setBrandColor, brandColor,setThemeMode} = useContext(Context); const currentTheme = getTheme(themeMode, brandColor); const mainColor = currentTheme?.palette?.backgroundColor const [isPreviousThemeLight, setIsPreviousThemeLight] = useState(false) @@ -197,7 +197,11 @@ const App = (message, props) => { }else{ handleThemeChange("dark") } - } + }else { + handleThemeChange("dark") + setThemeMode("dark") + localStorage.removeItem("theme"); + } // Handling Ethereum update