From 9852ed44fca2c71e6992e583d4cd3b874b6b18fa Mon Sep 17 00:00:00 2001 From: ilyayudovin Date: Thu, 25 Jun 2020 21:48:05 +0300 Subject: upload photo icon appear only on yours profile --- src/pages/ProfilePage/ProfileInfo.tsx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'src/pages/ProfilePage/ProfileInfo.tsx') diff --git a/src/pages/ProfilePage/ProfileInfo.tsx b/src/pages/ProfilePage/ProfileInfo.tsx index 2d2c67b..18a9fca 100644 --- a/src/pages/ProfilePage/ProfileInfo.tsx +++ b/src/pages/ProfilePage/ProfileInfo.tsx @@ -14,6 +14,7 @@ const useStyles = makeStyles({ avatar: { width: 150, height: 150, + margin: '0 auto' }, name: { fontSize: 20, @@ -57,18 +58,22 @@ const ProfileInfo: React.FC = ({ user, logOut }) => { const classes = useStyles(); return (
-
- } - > - - -
+ { + user?._id === localStorage.getItem('userId') + ?
+ } + > + + +
+ : + }
{user?.username}
-- cgit v1.2.3