From b31ed66aafbe1d5dbe70d0cdfd70864204510d81 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Tue, 30 Jun 2020 01:27:39 +0300
Subject: fix: re-implement navigation logic

---
 src/components/Header/Header.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/Header/Header.tsx')

diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx
index 546ecc3..72e40f8 100644
--- a/src/components/Header/Header.tsx
+++ b/src/components/Header/Header.tsx
@@ -40,7 +40,8 @@ const Header: React.FC = () => {
   };
 
   const handleProfile = (): void => {
-    navigate('profile');
+    if (user) navigate('profile');
+    else navigate('auth');
   };
 
   const handleNotifications = (): void => {};
-- 
cgit v1.2.3

