From 447d864ef38c4e3acdbee0031c15c1f24473851e Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Mon, 29 Jun 2020 04:25:18 +0300
Subject: fix: if url is not valid display icon

---
 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 1825647..363e300 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}>
             {
-              userImage !== undefined
+              userImage?.match(/\.(jpeg|jpg|gif|png)$/) !== null
                 ? <Avatar className={classes.avatar} src={userImage} />
                 : <AccountCircle />
             }
-- 
cgit v1.2.3

