From ec05810c90276c1c6dddd90e4c8e521a416876a1 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Thu, 12 Aug 2021 02:16:19 -0500 Subject: [PATCH] shit oops --- src/views/user-profile/UserProfileView.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/user-profile/UserProfileView.tsx b/src/views/user-profile/UserProfileView.tsx index 7fb6a222..8c443849 100644 --- a/src/views/user-profile/UserProfileView.tsx +++ b/src/views/user-profile/UserProfileView.tsx @@ -44,13 +44,16 @@ export const UserProfileView: FC = props => { const parser = event.getParser(); - if(userProfile && userProfile.id === parser.id) - OnClose(); + if(userProfile && userProfile.id !== parser.id) + { + setUserBadges([]); + setUserRelationships(null); + } setUserProfile(parser); SendMessageHook(new UserCurrentBadgesComposer(parser.id)); SendMessageHook(new UserRelationshipsComposer(parser.id)); - }, [OnClose, userProfile]); + }, [userProfile]); CreateMessageHook(UserProfileEvent, OnUserProfileEvent);