Skip to content

Commit

Permalink
Fix Theme switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
undyingwraith committed Nov 18, 2024
1 parent d2d24a9 commit e0b4dd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/Theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const baseTheme = createTheme({
},
});

export function createDarkTheme (accentColor: string) {
export function createDarkTheme(accentColor: string) {
return createTheme({
...baseTheme,
palette: {
Expand Down Expand Up @@ -35,4 +35,4 @@ export function createLightTheme(accentColor: string) {
},
},
});
}
}
10 changes: 6 additions & 4 deletions packages/ui/src/context/ThemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ export function ThemeContextProvider(props: PropsWithChildren<{}>) {
<ThemeContext.Provider value={{
darkMode,
}}>
<ThemeProvider theme={theme.value}>
<CssBaseline />
{props.children}
</ThemeProvider>
{useComputed(() => (
<ThemeProvider theme={theme.value}>
<CssBaseline />
{props.children}
</ThemeProvider>
))}
</ThemeContext.Provider>
);
}
Expand Down

0 comments on commit e0b4dd6

Please sign in to comment.