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


From 75c1dac4bceddab1d94b9e43c2fb2035297eb6bd Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Wed, 1 Jul 2020 14:38:39 +0300
Subject: fix eslint errors

---
 src/index.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index c304043..0ab06f5 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -5,14 +5,12 @@ import { CssBaseline } from '@material-ui/core';
 import teal from '@material-ui/core/colors/teal';
 import 'typeface-roboto';
 
+import { SnackbarProvider } from 'notistack';
 import Header from './components/Header/Header';
 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({
   palette: {
@@ -30,7 +28,7 @@ const App: React.FC = () => {
       maxSnack={3}
       anchorOrigin={{
         vertical: 'bottom',
-        horizontal: 'right',
+        horizontal: 'right'
       }}
     >
       <NavigationProvider>
-- 
cgit v1.2.3


From f9999d6da7752a55ad01f85dce34086c1acbff5a Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Wed, 1 Jul 2020 15:26:08 +0300
Subject: move snack provider to Page component

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

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index 0ab06f5..e8fbce1 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -5,7 +5,6 @@ import { CssBaseline } from '@material-ui/core';
 import teal from '@material-ui/core/colors/teal';
 import 'typeface-roboto';
 
-import { SnackbarProvider } from 'notistack';
 import Header from './components/Header/Header';
 import ScrollTopArrow from './components/ScrollTopArrow/ScrollTopArrow';
 import Page from './pages/Page';
@@ -24,24 +23,16 @@ const theme = createMuiTheme({
 
 const App: React.FC = () => {
   return (
-    <SnackbarProvider
-      maxSnack={3}
-      anchorOrigin={{
-        vertical: 'bottom',
-        horizontal: 'right'
-      }}
-    >
-      <NavigationProvider>
-        <AuthProvider>
-          <ThemeProvider theme={theme}>
-            <CssBaseline />
-            <Header />
-            <Page />
-            <ScrollTopArrow />
-          </ThemeProvider>
-        </AuthProvider>
-      </NavigationProvider>
-    </SnackbarProvider>
+    <NavigationProvider>
+      <AuthProvider>
+        <ThemeProvider theme={theme}>
+          <CssBaseline />
+          <Header />
+          <Page />
+          <ScrollTopArrow />
+        </ThemeProvider>
+      </AuthProvider>
+    </NavigationProvider>
   );
 };
 
-- 
cgit v1.2.3

