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 'status': {
18 return {
19 title: _(msg`Report this livestream`),
20 subtitle: _(msg`Why should this livestream be reviewed?`),
21 }
22 }
23 case 'post': {
24 return {
25 title: _(msg`Report this post`),
26 subtitle: _(msg`Why should this post be reviewed?`),
27 }
28 }
29 case 'list': {
30 return {
31 title: _(msg`Report this list`),
32 subtitle: _(msg`Why should this list be reviewed?`),
33 }
34 }
35 case 'feed': {
36 return {
37 title: _(msg`Report this feed`),
38 subtitle: _(msg`Why should this feed be reviewed?`),
39 }
40 }
41 case 'starterPack': {
42 return {
43 title: _(msg`Report this starter pack`),
44 subtitle: _(msg`Why should this starter pack be reviewed?`),
45 }
46 }
47 case 'convoMessage': {
48 switch (subject.view) {
49 case 'convo': {
50 return {
51 title: _(msg`Report this conversation`),
52 subtitle: _(msg`Why should this conversation be reviewed?`),
53 }
54 }
55 case 'message': {
56 return {
57 title: _(msg`Report this message`),
58 subtitle: _(msg`Why should this message be reviewed?`),
59 }
60 }
61 }
62 }
63 }
64 }, [_, subject])
65}