Use "notistack" to display toasts

This commit is contained in:
schroda
2024-09-07 01:27:07 +02:00
parent fea710b5dc
commit 74944407f7
5 changed files with 31 additions and 66 deletions

View File

@@ -16,6 +16,7 @@ import { CacheProvider, EmotionCache } from '@emotion/react';
import createCache from '@emotion/cache';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import { SnackbarProvider } from 'notistack';
import { createAndSetTheme } from '@/theme';
import { useLocalStorage } from '@/util/useStorage.tsx';
import { ThemeMode, ThemeModeContext } from '@/components/context/ThemeModeContext.tsx';
@@ -101,7 +102,7 @@ export const AppContext: React.FC<Props> = ({ children }) => {
<LibraryOptionsContextProvider>
<NavBarContextProvider>
<ActiveDevice.Provider value={activeDeviceContext}>
{children}
<SnackbarProvider>{children}</SnackbarProvider>
</ActiveDevice.Provider>
</NavBarContextProvider>
</LibraryOptionsContextProvider>