add snackbarProvider to App.tsx

This commit is contained in:
Muhammad Fajar
2022-11-17 11:00:44 +07:00
parent d778d5af89
commit eb43ef4d87

View File

@@ -3,18 +3,22 @@ import Router from './routes';
// theme // theme
import ThemeProvider from './theme'; import ThemeProvider from './theme';
// components // components
import Settings from './components/settings';
import RtlLayout from './components/RtlLayout'; import RtlLayout from './components/RtlLayout';
import ScrollToTop from './components/ScrollToTop'; import ScrollToTop from './components/ScrollToTop';
import { ProgressBarStyle } from './components/ProgressBar'; import { ProgressBarStyle } from './components/ProgressBar';
import ThemeColorPresets from './components/ThemeColorPresets'; import ThemeColorPresets from './components/ThemeColorPresets';
import MotionLazyContainer from './components/animate/MotionLazyContainer'; import MotionLazyContainer from './components/animate/MotionLazyContainer';
import { SnackbarProvider } from 'notistack';
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
export default function App() { export default function App() {
return ( return (
<ThemeProvider> <ThemeProvider>
<SnackbarProvider
autoHideDuration={2000}
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
>
<ThemeColorPresets> <ThemeColorPresets>
<RtlLayout> <RtlLayout>
<MotionLazyContainer> <MotionLazyContainer>
@@ -25,6 +29,7 @@ export default function App() {
</MotionLazyContainer> </MotionLazyContainer>
</RtlLayout> </RtlLayout>
</ThemeColorPresets> </ThemeColorPresets>
</SnackbarProvider>
</ThemeProvider> </ThemeProvider>
); );
} }