diff options
Diffstat (limited to 'subprojects/frontend/src/theme/ThemeProvider.tsx')
-rw-r--r-- | subprojects/frontend/src/theme/ThemeProvider.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/subprojects/frontend/src/theme/ThemeProvider.tsx b/subprojects/frontend/src/theme/ThemeProvider.tsx index 5aaf3ad1..6f9a712e 100644 --- a/subprojects/frontend/src/theme/ThemeProvider.tsx +++ b/subprojects/frontend/src/theme/ThemeProvider.tsx | |||
@@ -313,7 +313,11 @@ ContrastThemeProvider.defaultProps = { | |||
313 | children: undefined, | 313 | children: undefined, |
314 | }; | 314 | }; |
315 | 315 | ||
316 | function ThemeProvider({ children }: { children?: ReactNode }): JSX.Element { | 316 | const ThemeProvider = observer(function ThemeProvider({ |
317 | children, | ||
318 | }: { | ||
319 | children?: ReactNode; | ||
320 | }): JSX.Element { | ||
317 | const { | 321 | const { |
318 | themeStore: { darkMode }, | 322 | themeStore: { darkMode }, |
319 | } = useRootStore(); | 323 | } = useRootStore(); |
@@ -326,10 +330,10 @@ function ThemeProvider({ children }: { children?: ReactNode }): JSX.Element { | |||
326 | {children} | 330 | {children} |
327 | </ThemeAndContrastThemeProvider> | 331 | </ThemeAndContrastThemeProvider> |
328 | ); | 332 | ); |
329 | } | 333 | }); |
330 | 334 | ||
331 | ThemeProvider.defaultProps = { | 335 | ThemeProvider.defaultProps = { |
332 | children: undefined, | 336 | children: undefined, |
333 | }; | 337 | }; |
334 | 338 | ||
335 | export default observer(ThemeProvider); | 339 | export default ThemeProvider; |