if not login then show dark theme

This commit is contained in:
lalitdeore12@gmail.com
2025-06-03 14:09:28 +05:30
parent 9baeb51567
commit cdffb159f9
+6 -2
View File
@@ -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