From a5fbcc34f2529a2429124572915597c0fed45ae7 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Fri, 26 Jun 2020 19:07:37 +0300
Subject: show avatar in header only if user set an avatar image

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

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

diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx
index eb24ecc..a5e6817 100644
--- a/src/components/Header/Header.tsx
+++ b/src/components/Header/Header.tsx
@@ -62,7 +62,7 @@ const Header: React.FC<PropTypes> = ({ navigate, userImage }) => {
           </IconButton>
           <IconButton onClick={handleProfile}>
             {
-              localStorage.getItem('token')
+              userImage!== undefined
                 ? <Avatar className={classes.avatar} src={userImage}/>
                 : <AccountCircle />
             }
-- 
cgit v1.2.3

