From b4480738e3346b8b80fcdc3481b1de3266577ca0 Mon Sep 17 00:00:00 2001 From: Minseo Lee Date: Sat, 16 Mar 2024 16:50:15 +0900 Subject: [PATCH] Update ReasonOptions.tsx --- src/view/com/modals/report/ReasonOptions.tsx | 45 +++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/view/com/modals/report/ReasonOptions.tsx b/src/view/com/modals/report/ReasonOptions.tsx index 23b49b66..de904556 100644 --- a/src/view/com/modals/report/ReasonOptions.tsx +++ b/src/view/com/modals/report/ReasonOptions.tsx @@ -1,63 +1,66 @@ import {View} from 'react-native' import React, {useMemo} from 'react' import {AtUri, ComAtprotoModerationDefs} from '@atproto/api' +import {Trans} from '@lingui/macro' import {Text} from '../../util/text/Text' import {UsePaletteValue, usePalette} from 'lib/hooks/usePalette' import {RadioGroup, RadioGroupItem} from 'view/com/util/forms/RadioGroup' import {CollectionId} from './types' -type ReasonMap = Record +type ReasonMap = Record const CommonReasons = { [ComAtprotoModerationDefs.REASONRUDE]: { - title: 'Anti-Social Behavior', - description: 'Harassment, trolling, or intolerance', + title: Anti-Social Behavior, + description: Harassment, trolling, or intolerance, }, [ComAtprotoModerationDefs.REASONVIOLATION]: { - title: 'Illegal and Urgent', - description: 'Glaring violations of law or terms of service', + title: Illegal and Urgent, + description: Glaring violations of law or terms of service, }, [ComAtprotoModerationDefs.REASONOTHER]: { - title: 'Other', - description: 'An issue not included in these options', + title: Other, + description: An issue not included in these options, }, } const CollectionToReasonsMap: Record = { [CollectionId.Post]: { [ComAtprotoModerationDefs.REASONSPAM]: { - title: 'Spam', - description: 'Excessive mentions or replies', + title: Spam, + description: Excessive mentions or replies, }, [ComAtprotoModerationDefs.REASONSEXUAL]: { - title: 'Unwanted Sexual Content', - description: 'Nudity or pornography not labeled as such', + title: Unwanted Sexual Content, + description: Nudity or pornography not labeled as such, }, __copyright__: { - title: 'Copyright Violation', - description: 'Contains copyrighted material', + title: Copyright Violation, + description: Contains copyrighted material, }, ...CommonReasons, }, [CollectionId.List]: { ...CommonReasons, [ComAtprotoModerationDefs.REASONVIOLATION]: { - title: 'Name or Description Violates Community Standards', - description: 'Terms used violate community standards', + title: Name or Description Violates Community Standards, + description: Terms used violate community standards, }, }, } const AccountReportReasons = { [ComAtprotoModerationDefs.REASONMISLEADING]: { - title: 'Misleading Account', - description: 'Impersonation or false claims about identity or affiliation', + title: Misleading Account, + description: ( + Impersonation or false claims about identity or affiliation + ), }, [ComAtprotoModerationDefs.REASONSPAM]: { - title: 'Frequently Posts Unwanted Content', - description: 'Spam; excessive mentions or replies', + title: Frequently Posts Unwanted Content, + description: Spam; excessive mentions or replies, }, [ComAtprotoModerationDefs.REASONVIOLATION]: { - title: 'Name or Description Violates Community Standards', - description: 'Terms used violate community standards', + title: Name or Description Violates Community Standards, + description: Terms used violate community standards, }, }