mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 00:50:50 +01:00
updated renderer packet
This commit is contained in:
parent
367c1ec4de
commit
2fd73efa1d
@ -28,7 +28,7 @@ export const GroupsContainerView: FC<GroupsContainerViewProps> = props =>
|
|||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
{
|
{
|
||||||
if(groups.length > 0 && !selectedGroupId) setSelectedGroupId(groups[0].id);
|
if(groups.length > 0 && !selectedGroupId) setSelectedGroupId(groups[0].groupId);
|
||||||
}, [ groups, selectedGroupId ]);
|
}, [ groups, selectedGroupId ]);
|
||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
@ -49,9 +49,9 @@ export const GroupsContainerView: FC<GroupsContainerViewProps> = props =>
|
|||||||
<div className="h-100 overflow-auto d-flex flex-column gap-1">
|
<div className="h-100 overflow-auto d-flex flex-column gap-1">
|
||||||
{ groups.map((group, index) =>
|
{ groups.map((group, index) =>
|
||||||
{
|
{
|
||||||
return <div key={ index } onClick={ () => 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 }) }>
|
return <div key={ index } onClick={ () => setSelectedGroupId(group.groupId) } className={ 'profile-groups-item position-relative flex-shrink-0 d-flex align-items-center justify-content-center cursor-pointer' + classNames({ ' active': selectedGroupId === group.groupId }) }>
|
||||||
{ itsMe && <i className={ 'position-absolute icon icon-group-' + (group.ownerOrFavorite ? 'favorite' : 'not-favorite') } onClick={ () => favoriteGroup(group.id) } /> }
|
{ itsMe && <i className={ 'position-absolute icon icon-group-' + (group.favourite ? 'favorite' : 'not-favorite') } onClick={ () => favoriteGroup(group.groupId) } /> }
|
||||||
<BadgeImageView badgeCode={ group.badge } isGroup={ true } />
|
<BadgeImageView badgeCode={ group.badgeCode } isGroup={ true } />
|
||||||
</div>
|
</div>
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { GroupDataParser } from '@nitrots/nitro-renderer';
|
import { HabboGroupEntryData } from '@nitrots/nitro-renderer';
|
||||||
|
|
||||||
export interface GroupsContainerViewProps
|
export interface GroupsContainerViewProps
|
||||||
{
|
{
|
||||||
itsMe: boolean;
|
itsMe: boolean;
|
||||||
groups: GroupDataParser[];
|
groups: HabboGroupEntryData[];
|
||||||
onLeaveGroup: () => void;
|
onLeaveGroup: () => void;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user