aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/profile/Content.tsx12
-rw-r--r--src/components/profile/ProfileBody.tsx18
2 files changed, 9 insertions, 21 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx
index cc9849e6..9213e012 100644
--- a/src/components/profile/Content.tsx
+++ b/src/components/profile/Content.tsx
@@ -194,18 +194,6 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => {
}, [profile.profile_completion_stage, momentCategories]),
);
- /**
- * This hook is called on load of profile and when you update the friends list.
- */
- // useEffect(() => {
- // const isActuallyAFriend = friendsLoggedInUser.some(
- // (friend) => friend.username === user.username,
- // );
- // if (isFriend != isActuallyAFriend) {
- // setIsFriend(isActuallyAFriend);
- // }
- // }, [friendsLoggedInUser]);
-
useEffect(() => {
const isActuallyBlocked = blockedUsers.some(
(cur_user) => user.username === cur_user.username,
diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx
index 4076e473..64aec09c 100644
--- a/src/components/profile/ProfileBody.tsx
+++ b/src/components/profile/ProfileBody.tsx
@@ -57,15 +57,9 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({
const dispatch = useDispatch();
const handleAcceptRequest = async () => {
- try {
- await dispatch(
- acceptFriendRequest({id, username, first_name, last_name}),
- );
- await dispatch(updateUserXFriends(id, state));
- dispatch(updateUserXProfileAllScreens(id, state));
- } catch (err) {
- console.log(err);
- }
+ await dispatch(acceptFriendRequest({id, username, first_name, last_name}));
+ await dispatch(updateUserXFriends(id, state));
+ dispatch(updateUserXProfileAllScreens(id, state));
};
const handleDeclineFriendRequest = async () => {
@@ -144,6 +138,12 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({
};
const styles = StyleSheet.create({
+ toggleButtonContainer: {
+ flexDirection: 'row',
+ flex: 1,
+ paddingTop: '3.5%',
+ paddingBottom: '2%',
+ },
acceptRejectContainer: {
flexDirection: 'row',
},