diff options
author | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-29 04:25:18 +0300 |
---|---|---|
committer | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-29 04:25:18 +0300 |
commit | 447d864ef38c4e3acdbee0031c15c1f24473851e (patch) | |
tree | 3c72ef9ca2fafd4a6ceaf79b4dbb3b3b085c3516 /src/components | |
parent | ae43b7234f51fbe570e2274581654a214ae7f44b (diff) | |
download | which-ui-447d864ef38c4e3acdbee0031c15c1f24473851e.tar.gz |
fix: if url is not valid display icon
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Header/Header.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
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 /> } |