From 6f8aabbceaaad2f0f2a88e3a81ca3999d90fc462 Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Mon, 6 Sep 2021 05:10:19 -0300 Subject: [PATCH] Fix Profile Groups --- src/views/user-profile/UserProfileView.tsx | 2 +- .../views/groups-container/GroupsContainerView.tsx | 4 ++-- .../views/groups-container/GroupsContainerView.types.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/user-profile/UserProfileView.tsx b/src/views/user-profile/UserProfileView.tsx index e732b384..14a579f0 100644 --- a/src/views/user-profile/UserProfileView.tsx +++ b/src/views/user-profile/UserProfileView.tsx @@ -86,7 +86,7 @@ export const UserProfileView: FC = props => {LocalizeText('extendedprofile.rooms')} - + ) diff --git a/src/views/user-profile/views/groups-container/GroupsContainerView.tsx b/src/views/user-profile/views/groups-container/GroupsContainerView.tsx index 50eadaa5..a5dcb17f 100644 --- a/src/views/user-profile/views/groups-container/GroupsContainerView.tsx +++ b/src/views/user-profile/views/groups-container/GroupsContainerView.tsx @@ -8,7 +8,7 @@ import { GroupsContainerViewProps } from './GroupsContainerView.types'; export const GroupsContainerView: FC = props => { - const { groups = null, onLeaveGroup = null } = props; + const { itsMe = null, groups = null, onLeaveGroup = null } = props; const [ selectedGroupId, setSelectedGroupId ] = useState(null); const [ groupInformation, setGroupInformation ] = useState(null); @@ -50,7 +50,7 @@ export const GroupsContainerView: FC = props => { groups.map((group, index) => { return
setSelectedGroupId(group.id) } className={ 'profile-groups-item position-relative flex-shrink-0 d-flex align-items-center justify-content-center cursor-pointer' + classNames({ ' active': selectedGroupId === group.id }) }> - favoriteGroup(group.id) } /> + { itsMe && favoriteGroup(group.id) } /> }
}) } diff --git a/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts b/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts index 0426ca8e..40b273af 100644 --- a/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts +++ b/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts @@ -2,6 +2,7 @@ import { GroupDataParser } from '@nitrots/nitro-renderer'; export interface GroupsContainerViewProps { + itsMe: boolean; groups: GroupDataParser[]; onLeaveGroup: () => void; }