Fix setting default color mode in dev mode
Without this, the last_compiled_timestamp local storage never gets set because it's always `null` until it gets set.
This commit is contained in:
parent
427d7c56ab
commit
8ab7512926
@ -16,10 +16,7 @@ export default function RadixThemesColorModeProvider({ children }) {
|
||||
if (isDevMode) {
|
||||
const lastCompiledTimeInLocalStorage =
|
||||
localStorage.getItem("last_compiled_time");
|
||||
if (
|
||||
lastCompiledTimeInLocalStorage &&
|
||||
lastCompiledTimeInLocalStorage !== lastCompiledTimeStamp
|
||||
) {
|
||||
if (lastCompiledTimeInLocalStorage !== lastCompiledTimeStamp) {
|
||||
// on app startup, make sure the application color mode is persisted correctly.
|
||||
setTheme(defaultColorMode);
|
||||
localStorage.setItem("last_compiled_time", lastCompiledTimeStamp);
|
||||
|
Loading…
Reference in New Issue
Block a user