diff options
Diffstat (limited to 'src/components/profile/Content.tsx')
-rw-r--r-- | src/components/profile/Content.tsx | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index f7b4b71c..cc9849e6 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -42,6 +42,7 @@ import { updateUserXFriends, updateMomentCategories, deleteUserMomentsForCategory, + updateUserXProfileAllScreens, } from '../../store/actions'; import { NO_USER, @@ -214,29 +215,6 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => { } }, [blockedUsers, user]); - // /** - // * The object returned by this method is added to the list of blocked / friended users by the reducer. - // * Which helps us prevent an extra api call to the backend just to fetch a user. - // */ - // const getUserAsProfilePreviewType = ( - // passedInUser: UserType, - // passedInProfile: ProfileType, - // ): ProfilePreviewType => { - // const fullName = passedInProfile.name.split(' '); - // return { - // id: passedInUser.userId, - // username: passedInUser.username, - // first_name: fullName[0], - // last_name: fullName[1], - // }; - // }; - - /** - * Handles a click on the friend / unfriend button. - * friendUnfriendUser takes care of updating the friends list for loggedInUser - * updateUserXFriends updates friends list for the new friend. - */ - // Handles click on friend/requested/unfriend button /* * When user logged in clicks on the friend button: @@ -259,6 +237,7 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => { ), ); await dispatch(updateUserXFriends(user.userId, state)); + dispatch(updateUserXProfileAllScreens(user.userId, state)); }; /** |