diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 4495d7aa..cfbc768a 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -1068,8 +1068,6 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) { activatedAppIds = append(activatedAppIds, app.ID) } - userInfo.ActiveOrg.Branding = org.Branding - returnValue := shuffle.HandleInfo{ Success: true, Username: userInfo.Username, @@ -1092,6 +1090,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) { Priorities: orgPriorities, Licensed: licensed, ActiveApps: activatedAppIds, + Theme: userInfo.Theme, } returnData, err := json.Marshal(returnValue) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index caa9e1cb..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) @@ -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