Fix Group Furniture Context Menu

This commit is contained in:
MyNameIsBatman 2021-09-03 02:18:45 -03:00
parent 796c4a12e1
commit 0b568a089f

View File

@ -1,7 +1,7 @@
import { ContextMenuEnum, GroupFurniContextMenuInfoMessageParser, RoomEngineTriggerWidgetEvent, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { ContextMenuEnum, GroupFurniContextMenuInfoMessageParser, RoomEngineTriggerWidgetEvent, RoomObjectCategory } from '@nitrots/nitro-renderer';
import { GroupFurniContextMenuInfoMessageEvent } from '@nitrots/nitro-renderer/src/nitro/communication/messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent'; import { GroupFurniContextMenuInfoMessageEvent } from '@nitrots/nitro-renderer/src/nitro/communication/messages/incoming/room/furniture/GroupFurniContextMenuInfoMessageEvent';
import { FC, useCallback, useState } from 'react'; import { FC, useCallback, useState } from 'react';
import { GetRoomEngine, IsOwnerOfFurniture, LocalizeText, RoomWidgetFurniActionMessage, TryVisitRoom } from '../../../../../api'; import { GetGroupInformation, GetRoomEngine, IsOwnerOfFurniture, LocalizeText, RoomWidgetFurniActionMessage, TryVisitRoom } from '../../../../../api';
import { TryJoinGroup } from '../../../../../api/groups/TryJoinGroup'; import { TryJoinGroup } from '../../../../../api/groups/TryJoinGroup';
import { CreateMessageHook } from '../../../../../hooks'; import { CreateMessageHook } from '../../../../../hooks';
import { useRoomEngineEvent } from '../../../../../hooks/events'; import { useRoomEngineEvent } from '../../../../../hooks/events';
@ -183,7 +183,7 @@ export const FurnitureContextMenuView: FC<{}> = props =>
</> } </> }
{ (mode === GROUP_FURNITURE) && groupData && { (mode === GROUP_FURNITURE) && groupData &&
<> <>
<ContextMenuHeaderView> <ContextMenuHeaderView className="cursor-pointer" onClick={ () => GetGroupInformation(groupData.guildId) }>
{ groupData.guildName } { groupData.guildName }
</ContextMenuHeaderView> </ContextMenuHeaderView>
{ !isGroupMember && <ContextMenuListItemView onClick={ event => processAction('join_group') }> { !isGroupMember && <ContextMenuListItemView onClick={ event => processAction('join_group') }>