diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/profile/Friends.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
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<FriendsProps> = ({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<FriendsProps> = ({result, screenType, userId}) => { screenType={screenType} /> </View> - {loggedInUser.userId !== userId && ( + {loggedInUser.userId === userId && ( <TouchableOpacity style={styles.unfriendButton} onPress={() => |