From 2a65284a385915818ca5f3e3b7354554e19af9cb Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Mon, 15 Jun 2020 15:52:40 +0300
Subject: style: fix eslint errors

---
 src/index.tsx | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index d7326cb..876491d 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -39,14 +39,17 @@ const App: React.FC = () => {
   const classes = useStyles();
 
   const navigate = (prefix: string, id?: string): void => {
-    if (prefix === 'profile' && !id && !user) setPage({
-      prefix: 'auth',
-      id: ''
-    });
-    else setPage({
-      prefix,
-      id: (id || user?._id || '')
-    });
+    if (prefix === 'profile' && !id && !user) {
+      setPage({
+        prefix: 'auth',
+        id: ''
+      });
+    } else {
+      setPage({
+        prefix,
+        id: (id || user?._id || '')
+      });
+    }
   };
 
   const logOut = () => {
@@ -71,7 +74,7 @@ const App: React.FC = () => {
       <div className={classes.root}>
         { page.prefix === 'profile' && <ProfilePage logOut={logOut} id={page.id} navigate={navigate} /> }
         { page.prefix === 'feed' && <FeedPage navigate={navigate} /> }
-        { page.prefix === 'auth' && <AuthPage setUser={setUser} navigate={navigate}/> }
+        { page.prefix === 'auth' && <AuthPage setUser={setUser} navigate={navigate} /> }
       </div>
     </ThemeProvider>
   );
-- 
cgit v1.2.3

