From 75eb28d8338c1e0601c94640303f91ef09bd583a Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Tue, 30 Jun 2020 18:41:28 +0300
Subject: feat: add snackbar for showing messages to a user

---
 src/index.tsx | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index 180f80c..c304043 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -10,6 +10,8 @@ import ScrollTopArrow from './components/ScrollTopArrow/ScrollTopArrow';
 import Page from './pages/Page';
 import { AuthProvider } from './hooks/useAuth';
 import { NavigationProvider } from './hooks/useNavigate';
+import { SnackbarProvider } from 'notistack';
+
 
 
 const theme = createMuiTheme({
@@ -24,16 +26,24 @@ const theme = createMuiTheme({
 
 const App: React.FC = () => {
   return (
-    <NavigationProvider>
-      <AuthProvider>
-        <ThemeProvider theme={theme}>
-          <CssBaseline />
-          <Header />
-          <Page />
-          <ScrollTopArrow />
-        </ThemeProvider>
-      </AuthProvider>
-    </NavigationProvider>
+    <SnackbarProvider
+      maxSnack={3}
+      anchorOrigin={{
+        vertical: 'bottom',
+        horizontal: 'right',
+      }}
+    >
+      <NavigationProvider>
+        <AuthProvider>
+          <ThemeProvider theme={theme}>
+            <CssBaseline />
+            <Header />
+            <Page />
+            <ScrollTopArrow />
+          </ThemeProvider>
+        </AuthProvider>
+      </NavigationProvider>
+    </SnackbarProvider>
   );
 };
 
-- 
cgit v1.2.3

