Complete configuration for build

This commit is contained in:
2025-08-09 19:09:49 -04:00
parent 689f446806
commit b3803162b4
15 changed files with 107 additions and 31 deletions

View File

@@ -7,7 +7,7 @@ const themeInitialState: ThemeProviderState = {
setTheme: () => null
}
export const ThemeProviderContext = createContext<ThemeProviderState>(themeInitialState);
const ThemeProviderContext = createContext<ThemeProviderState>(themeInitialState);
export default function ThemeProvider(props: ThemeProviderProps){
@@ -40,7 +40,7 @@ export default function ThemeProvider(props: ThemeProviderProps){
localStorage.setItem(storageKey, theme);
setTheme(theme);
}
}), [ theme ]);
}), [storageKey, theme]);
return (
<ThemeProviderContext.Provider value={value}>
@@ -50,6 +50,7 @@ export default function ThemeProvider(props: ThemeProviderProps){
}
// eslint-disable-next-line react-refresh/only-export-components
export function useTheme(){
const context = useContext(ThemeProviderContext);