diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-06-16 20:21:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 20:21:35 +0300 |
commit | 0e7c2d476225b3e381a86710a3635ab707387499 (patch) | |
tree | 27a9134031b4c90a9c887fbf9d8d2fa0e80a4109 /src/pages/ProfilePage/ProfileInfo.tsx | |
parent | b860685d212200b5a46b7fea066306b851bf6e26 (diff) | |
parent | 5ec0669e6160f025017684a7d48f1d07a1768785 (diff) | |
download | which-ui-0e7c2d476225b3e381a86710a3635ab707387499.tar.gz |
Merge pull request #38 from ilyayudovin/registration
Registration form
Diffstat (limited to 'src/pages/ProfilePage/ProfileInfo.tsx')
-rw-r--r-- | src/pages/ProfilePage/ProfileInfo.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pages/ProfilePage/ProfileInfo.tsx b/src/pages/ProfilePage/ProfileInfo.tsx index c2f242a..bddecd8 100644 --- a/src/pages/ProfilePage/ProfileInfo.tsx +++ b/src/pages/ProfilePage/ProfileInfo.tsx @@ -37,7 +37,6 @@ const useStyles = makeStyles({ const ProfileInfo: React.FC<PropTypes> = ({ user, logOut }) => { const classes = useStyles(); - return ( <div> <Avatar className={classes.avatar} src={user?.avatarUrl} /> @@ -55,7 +54,11 @@ const ProfileInfo: React.FC<PropTypes> = ({ user, logOut }) => { Following </div> </div> - <Button variant="contained" onClick={logOut}>Log Out</Button> + { + user?._id === localStorage.getItem('userId') + ? <Button variant="contained" onClick={logOut}>Log Out</Button> + : null + } </div> ); }; |