forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {useMemo} from 'react'
2import {msg} from '@lingui/macro'
3import {useLingui} from '@lingui/react'
4
5import {type ParsedReportSubject} from './types'
6
7export function useCopyForSubject(subject: ParsedReportSubject) {
8 const {_} = useLingui()
9 return useMemo(() => {
10 switch (subject.type) {
11 case 'account': {
12 return {
13 title: _(msg`Report this user`),
14 subtitle: _(msg`Why should this user be reviewed?`),
15 }
16 }
17 case 'post': {
18 return {
19 title: _(msg`Report this skeet`),
20 subtitle: _(msg`Why should this skeet be reviewed?`),
21 }
22 }
23 case 'list': {
24 return {
25 title: _(msg`Report this list`),
26 subtitle: _(msg`Why should this list be reviewed?`),
27 }
28 }
29 case 'feed': {
30 return {
31 title: _(msg`Report this feed`),
32 subtitle: _(msg`Why should this feed be reviewed?`),
33 }
34 }
35 case 'starterPack': {
36 return {
37 title: _(msg`Report this starter pack`),
38 subtitle: _(msg`Why should this starter pack be reviewed?`),
39 }
40 }
41 case 'convoMessage': {
42 switch (subject.view) {
43 case 'convo': {
44 return {
45 title: _(msg`Report this conversation`),
46 subtitle: _(msg`Why should this conversation be reviewed?`),
47 }
48 }
49 case 'message': {
50 return {
51 title: _(msg`Report this message`),
52 subtitle: _(msg`Why should this message be reviewed?`),
53 }
54 }
55 }
56 }
57 }
58 }, [_, subject])
59}