diff --git a/src/components/IncidentReportTracker/IncidentReportTracker.tsx b/src/components/IncidentReportTracker/IncidentReportTracker.tsx index b0467c1935..d68ef1eea2 100644 --- a/src/components/IncidentReportTracker/IncidentReportTracker.tsx +++ b/src/components/IncidentReportTracker/IncidentReportTracker.tsx @@ -245,7 +245,7 @@ export function IncidentReportTracker(): JSX.Element | null { )} )} - {filtered_reports.map((report, index) => ( + {filtered_reports.map((report: Report, index) => (
void; submit: (action: string, note: string) => void; } @@ -106,9 +109,13 @@ export function ModerationActionSelector({ available_actions, vote_counts, enable, + report, claim, submit, }: ModerationActionSelectorProps): JSX.Element { + const user = useUser(); + const reportedBySelf = user.id === report.reporting_user.id; + const [selectedOption, setSelectedOption] = React.useState(""); const [mod_note, setModNote] = React.useState(""); const [voted, setVoted] = React.useState(false); @@ -175,18 +182,28 @@ export function ModerationActionSelector({ onChange={(ev) => setModNote(ev.target.value)} /> )} - {((action_choices && enable) || null) && ( - - )} + + {((reportedBySelf && enable) || null) && ( + + )} + {((action_choices && enable) || null) && ( + + )} +
); } diff --git a/src/views/ReportsCenter/ViewReport.tsx b/src/views/ReportsCenter/ViewReport.tsx index 9516e8263c..6f6e4661bc 100644 --- a/src/views/ReportsCenter/ViewReport.tsx +++ b/src/views/ReportsCenter/ViewReport.tsx @@ -529,6 +529,7 @@ export function ViewReport({ report_id, reports, onChange }: ViewReportProps): J enable={report.state === "pending" && !report.escalated} // clear the selection for subsequent reports key={report.id} + report={report} />
)}