diff options
author | Ivan Chen <ivan@tagg.id> | 2021-02-05 17:35:05 -0500 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-02-05 17:35:05 -0500 |
commit | 231fed8c645dc29334b946dccca94fbb13116fe2 (patch) | |
tree | fc7bcd0f9e11b943d89877c621e95681e89a18d7 /src/components/profile/Content.tsx | |
parent | a5f746525df9bb2967c252b70e7a4e2f9daa2b8d (diff) | |
parent | bad7fac394f8ef2870a9a139fd46d0def4421bf1 (diff) |
Merge branch 'master' into TMA-579-Redesign-Snapchat-Tiktok
# Conflicts:
# src/components/common/TaggSquareButton.tsx
Diffstat (limited to 'src/components/profile/Content.tsx')
-rw-r--r-- | src/components/profile/Content.tsx | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index a35a5820..28000dd7 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -25,11 +25,9 @@ import { import { blockUnblockUser, deleteUserMomentsForCategory, - friendUnfriendUser, loadFriendsData, updateMomentCategories, updateUserXFriends, - updateUserXProfileAllScreens, } from '../../store/actions'; import { EMPTY_MOMENTS_LIST, @@ -216,31 +214,6 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => { } }, [blockedUsers, user]); - // Handles click on friend/requested/unfriend button - /* - * When user logged in clicks on the friend button: - A request is sent. - Which means you have to update the status of their friendshpi to requested - When the status is changed to requested the button should change to requested. - When the button is changed to requested and thr user clicks on it, - a request much go to the backend to delete that request - When that succeeds, their friendship must be updated to no-record again; - When the button is changed to no_record, the add friends button should be displayed again - */ - const handleFriendUnfriend = async () => { - const {friendship_status} = profile; - await dispatch( - friendUnfriendUser( - loggedInUser, - getUserAsProfilePreviewType(user, profile), - friendship_status, - screenType, - ), - ); - await dispatch(updateUserXFriends(user.userId, state)); - dispatch(updateUserXProfileAllScreens(user.userId, state)); - }; - /** * Handles a click on the block / unblock button. * loadFriends updates friends list for the logged in user @@ -332,7 +305,6 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => { userXId, screenType, isFriend, - handleFriendUnfriend, handleBlockUnblock, isBlocked, }} |