Make generic convo report dialog (#4085)

This commit is contained in:
Eric Bailey 2024-05-17 17:56:58 -05:00 committed by GitHub
parent 1cdcb3e6c3
commit 8b3bfb3cf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 117 additions and 66 deletions

View file

@ -25,12 +25,10 @@ import {SquareArrowTopRight_Stroke2_Corner0_Rounded as SquareArrowTopRight} from
import {Text} from '#/components/Typography'
import {ReportDialogProps} from './types'
type ParamsWithMessages = ReportDialogProps['params'] | {type: 'message'}
export function SelectReportOptionView({
...props
}: {
params: ParamsWithMessages
params: ReportDialogProps['params']
labelers: AppBskyLabelerDefs.LabelerViewDetailed[]
onSelectReportOption: (reportOption: ReportOption) => void
goBack: () => void
@ -57,9 +55,12 @@ export function SelectReportOptionView({
} else if (props.params.type === 'feedgen') {
title = _(msg`Report this feed`)
description = _(msg`Why should this feed be reviewed?`)
} else if (props.params.type === 'message') {
} else if (props.params.type === 'convoMessage') {
title = _(msg`Report this message`)
description = _(msg`Why should this message be reviewed?`)
} else if (props.params.type === 'convoAccount') {
title = _(msg`Report this account`)
description = _(msg`Why should this account be reviewed?`)
}
return {

View file

@ -12,4 +12,6 @@ export type ReportDialogProps = {
type: 'account'
did: string
}
| {type: 'convoMessage'}
| {type: 'convoAccount'}
}