Merge pull request #1717 from LalitDeore/release-changes

add theming changes for onprem
This commit is contained in:
Frikky
2025-06-04 18:37:47 +02:00
committed by GitHub
2 changed files with 12 additions and 4 deletions
+11 -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)
@@ -192,7 +192,16 @@ const App = (message, props) => {
{ path: "/" }
);
}
}
if (responseJson?.theme?.length > 0) {
handleThemeChange(responseJson.theme)
}else{
handleThemeChange("dark")
}
}else {
handleThemeChange("dark")
setThemeMode("dark")
localStorage.removeItem("theme");
}
// Handling Ethereum update