aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-03-19 09:49:04 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-03-19 09:49:04 -0700
commitaeb79eb45499edbd71ed799a8bdc0ca6a566ab58 (patch)
tree37b56be654d4e4b89f5c15b7e7aa95a35e3b9402
parent853b92cce77bd84fd93806b6519afa4ac4dde508 (diff)
fixed
-rw-r--r--src/components/profile/Friends.tsx8
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={() =>