From fa2e3a5c0e8fabaa22587d04a55300d9b94157fe Mon Sep 17 00:00:00 2001 From: ilyayudovin Date: Mon, 15 Jun 2020 16:24:48 +0300 Subject: fix: logout button display only at account owner --- src/pages/ProfilePage/ProfileInfo.tsx | 7 +++++-- 1 file 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 = ({ user, logOut }) => { const classes = useStyles(); - return (
@@ -55,7 +54,11 @@ const ProfileInfo: React.FC = ({ user, logOut }) => { Following
- + { + user?._id === localStorage.getItem('userId') + ? + : null + } ); }; -- cgit v1.2.3