aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-03-31 17:01:08 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-03-31 17:07:04 +0200
commit8a7bc8885f3afea425b1f236a5ca8cef513b03cf (patch)
treeaf1bbad524a1459a2e0096c88232513fb5b055da /subprojects/frontend/src
parentfeat: terms and improved query evaluation (diff)
downloadrefinery-8a7bc8885f3afea425b1f236a5ca8cef513b03cf.tar.gz
refinery-8a7bc8885f3afea425b1f236a5ca8cef513b03cf.tar.zst
refinery-8a7bc8885f3afea425b1f236a5ca8cef513b03cf.zip
chore(deps): bump dependencies
Diffstat (limited to 'subprojects/frontend/src')
-rw-r--r--subprojects/frontend/src/Refinery.tsx1
-rw-r--r--subprojects/frontend/src/UpdateNotification.tsx4
-rw-r--r--subprojects/frontend/src/theme/ThemeProvider.tsx8
3 files changed, 5 insertions, 8 deletions
diff --git a/subprojects/frontend/src/Refinery.tsx b/subprojects/frontend/src/Refinery.tsx
index 93a82ee1..f0162349 100644
--- a/subprojects/frontend/src/Refinery.tsx
+++ b/subprojects/frontend/src/Refinery.tsx
@@ -8,7 +8,6 @@ import EditorPane from './editor/EditorPane';
8 8
9export default function Refinery(): JSX.Element { 9export default function Refinery(): JSX.Element {
10 return ( 10 return (
11 // @ts-expect-error -- notistack has problems with `exactOptionalPropertyTypes
12 <SnackbarProvider TransitionComponent={Grow}> 11 <SnackbarProvider TransitionComponent={Grow}>
13 <UpdateNotification /> 12 <UpdateNotification />
14 <Stack direction="column" height="100%" overflow="auto"> 13 <Stack direction="column" height="100%" overflow="auto">
diff --git a/subprojects/frontend/src/UpdateNotification.tsx b/subprojects/frontend/src/UpdateNotification.tsx
index 07f7f5f7..5c8c2d01 100644
--- a/subprojects/frontend/src/UpdateNotification.tsx
+++ b/subprojects/frontend/src/UpdateNotification.tsx
@@ -32,14 +32,14 @@ export default observer(function UpdateNotification(): null {
32 return enqueueLater('Failed to download update', { 32 return enqueueLater('Failed to download update', {
33 variant: 'error', 33 variant: 'error',
34 action: ( 34 action: (
35 <> 35 <ContrastThemeProvider>
36 <Button color="inherit" onClick={() => pwaStore.checkForUpdates()}> 36 <Button color="inherit" onClick={() => pwaStore.checkForUpdates()}>
37 Try again 37 Try again
38 </Button> 38 </Button>
39 <Button color="inherit" onClick={() => pwaStore.dismissError()}> 39 <Button color="inherit" onClick={() => pwaStore.dismissError()}>
40 Dismiss 40 Dismiss
41 </Button> 41 </Button>
42 </> 42 </ContrastThemeProvider>
43 ), 43 ),
44 }); 44 });
45 } 45 }
diff --git a/subprojects/frontend/src/theme/ThemeProvider.tsx b/subprojects/frontend/src/theme/ThemeProvider.tsx
index 7bda1ede..ff97d524 100644
--- a/subprojects/frontend/src/theme/ThemeProvider.tsx
+++ b/subprojects/frontend/src/theme/ThemeProvider.tsx
@@ -6,7 +6,6 @@ import {
6 type ThemeOptions, 6 type ThemeOptions,
7 ThemeProvider as MaterialUiThemeProvider, 7 ThemeProvider as MaterialUiThemeProvider,
8 type TypographyStyle, 8 type TypographyStyle,
9 useTheme,
10 type CSSObject, 9 type CSSObject,
11} from '@mui/material/styles'; 10} from '@mui/material/styles';
12import { observer } from 'mobx-react-lite'; 11import { observer } from 'mobx-react-lite';
@@ -350,15 +349,14 @@ export function ContrastThemeProvider({
350}: { 349}: {
351 children?: ReactNode; 350 children?: ReactNode;
352}): JSX.Element { 351}): JSX.Element {
353 const theme = useTheme();
354 const contrastTheme = useContext(ContrastThemeContext); 352 const contrastTheme = useContext(ContrastThemeContext);
355 if (!contrastTheme) { 353 if (!contrastTheme) {
356 throw new Error('ContrastThemeProvider must be used within ThemeProvider'); 354 throw new Error('ContrastThemeProvider must be used within ThemeProvider');
357 } 355 }
358 return ( 356 return (
359 <ThemeAndContrastThemeProvider theme={contrastTheme} contrastTheme={theme}> 357 <MaterialUiThemeProvider theme={contrastTheme}>
360 {children} 358 {children}
361 </ThemeAndContrastThemeProvider> 359 </MaterialUiThemeProvider>
362 ); 360 );
363} 361}
364 362
@@ -378,7 +376,7 @@ const ThemeProvider = observer(function ThemeProvider({
378 return ( 376 return (
379 <ThemeAndContrastThemeProvider 377 <ThemeAndContrastThemeProvider
380 theme={darkMode ? darkTheme : lightTheme} 378 theme={darkMode ? darkTheme : lightTheme}
381 contrastTheme={darkMode ? lightTheme : darkTheme} 379 contrastTheme={darkTheme}
382 > 380 >
383 {children} 381 {children}
384 </ThemeAndContrastThemeProvider> 382 </ThemeAndContrastThemeProvider>