diff --git a/src/components/help/views/HelpIndexView.tsx b/src/components/help/views/HelpIndexView.tsx index b4f0743a..c541f34b 100644 --- a/src/components/help/views/HelpIndexView.tsx +++ b/src/components/help/views/HelpIndexView.tsx @@ -1,6 +1,6 @@ import { GetCfhStatusMessageComposer } from '@nitrots/nitro-renderer'; import { FC } from 'react'; -import { DispatchUiEvent, LocalizeText, ReportState, SendMessageComposer } from '../../../api'; +import { DispatchUiEvent, LocalizeText, ReportState, ReportType, SendMessageComposer } from '../../../api'; import { Button, Column, Text } from '../../../common'; import { GuideToolEvent } from '../../../events'; import { useHelp } from '../../../hooks'; @@ -14,8 +14,9 @@ export const HelpIndexView: FC<{}> = props => setActiveReport(prevValue => { const currentStep = ReportState.SELECT_USER; + const reportType = ReportType.BULLY; - return { ...prevValue, currentStep }; + return { ...prevValue, currentStep, reportType }; }); } diff --git a/src/components/help/views/SelectReportedUserView.tsx b/src/components/help/views/SelectReportedUserView.tsx index 834af4d4..a4263f56 100644 --- a/src/components/help/views/SelectReportedUserView.tsx +++ b/src/components/help/views/SelectReportedUserView.tsx @@ -22,13 +22,13 @@ export const SelectReportedUserView: FC<{}> = props => return Array.from(users.values()); }, [ chatHistory ]); - const submitUser = () => + const submitUser = (userId: number) => { - if(selectedUserId <= 0) return; + if(userId <= 0) return; setActiveReport(prevValue => { - return { ...prevValue, reportedUserId: selectedUserId, currentStep: ReportState.SELECT_CHATS }; + return { ...prevValue, reportedUserId: userId, currentStep: ReportState.SELECT_CHATS }; }); } @@ -76,7 +76,7 @@ export const SelectReportedUserView: FC<{}> = props => -