diff --git a/src/components/navigator/views/NavigatorRoomInfoView.tsx b/src/components/navigator/views/NavigatorRoomInfoView.tsx index 2651d8a4..20a88a30 100644 --- a/src/components/navigator/views/NavigatorRoomInfoView.tsx +++ b/src/components/navigator/views/NavigatorRoomInfoView.tsx @@ -1,10 +1,10 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { RoomMuteComposer, RoomSettingsComposer, SecurityLevel, ToggleStaffPickMessageComposer, UpdateHomeRoomMessageComposer } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; -import { CreateLinkEvent, DispatchUiEvent, GetGroupInformation, GetSessionDataManager, LocalizeText, SendMessageComposer } from '../../../api'; +import { CreateLinkEvent, DispatchUiEvent, GetGroupInformation, GetSessionDataManager, LocalizeText, ReportType, SendMessageComposer } from '../../../api'; import { Button, classNames, Column, Flex, LayoutBadgeImageView, LayoutRoomThumbnailView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text, UserProfileIconView } from '../../../common'; import { RoomWidgetThumbnailEvent } from '../../../events'; -import { useNavigator } from '../../../hooks'; +import { useHelp, useNavigator } from '../../../hooks'; export class NavigatorRoomInfoViewProps { @@ -16,6 +16,7 @@ export const NavigatorRoomInfoView: FC = props => const { onCloseClick = null } = props; const [ isRoomPicked, setIsRoomPicked ] = useState(false); const [ isRoomMuted, setIsRoomMuted ] = useState(false); + const { report = null } = useHelp(); const { navigatorData = null } = useNavigator(); const hasPermission = (permission: string) => @@ -71,6 +72,9 @@ export const NavigatorRoomInfoView: FC = props => case 'open_floorplan_editor': CreateLinkEvent('floor-editor/toggle'); return; + case 'report_room': + report(ReportType.ROOM, { roomId: navigatorData.enteredGuestRoom.roomId, roomName: navigatorData.enteredGuestRoom.roomName }); + return; case 'close': onCloseClick(); return; @@ -147,7 +151,7 @@ export const NavigatorRoomInfoView: FC = props => } - { hasPermission('settings') &&