From aeb79eb45499edbd71ed799a8bdc0ca6a566ab58 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 19 Mar 2021 09:49:04 -0700 Subject: fixed --- src/components/profile/Friends.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/components') diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index d87b0fb0..0f5596d5 100644 --- a/src/components/profile/Friends.tsx +++ b/src/components/profile/Friends.tsx @@ -26,12 +26,10 @@ interface FriendsProps { } const Friends: React.FC = ({result, screenType, userId}) => { + const state: RootState = useStore().getState(); const dispatch = useDispatch(); + const {user: loggedInUser = NO_USER} = state; const navigation = useNavigation(); - const {user: loggedInUser = NO_USER} = useSelector( - (state: RootState) => state.user, - ); - const state = useStore().getState(); const [usersFromContacts, setUsersFromContacts] = useState< ProfilePreviewType[] >([]); @@ -141,7 +139,7 @@ const Friends: React.FC = ({result, screenType, userId}) => { screenType={screenType} /> - {loggedInUser.userId !== userId && ( + {loggedInUser.userId === userId && ( -- cgit v1.2.3-70-g09d2