if not login then show dark theme
This commit is contained in:
@@ -92,7 +92,7 @@ const App = (message, props) => {
|
|||||||
const [dataset, setDataset] = useState(false)
|
const [dataset, setDataset] = useState(false)
|
||||||
const [isLoaded, setIsLoaded] = useState(false)
|
const [isLoaded, setIsLoaded] = useState(false)
|
||||||
const [curpath, setCurpath] = useState(typeof window === "undefined" || window.location === undefined ? "" : window.location.pathname)
|
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 currentTheme = getTheme(themeMode, brandColor);
|
||||||
const mainColor = currentTheme?.palette?.backgroundColor
|
const mainColor = currentTheme?.palette?.backgroundColor
|
||||||
const [isPreviousThemeLight, setIsPreviousThemeLight] = useState(false)
|
const [isPreviousThemeLight, setIsPreviousThemeLight] = useState(false)
|
||||||
@@ -197,7 +197,11 @@ const App = (message, props) => {
|
|||||||
}else{
|
}else{
|
||||||
handleThemeChange("dark")
|
handleThemeChange("dark")
|
||||||
}
|
}
|
||||||
}
|
}else {
|
||||||
|
handleThemeChange("dark")
|
||||||
|
setThemeMode("dark")
|
||||||
|
localStorage.removeItem("theme");
|
||||||
|
}
|
||||||
|
|
||||||
// Handling Ethereum update
|
// Handling Ethereum update
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user