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);