diff options
author | Eric Bailey <git@esb.lol> | 2024-09-04 18:34:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 18:34:19 -0500 |
commit | 76f493c27958d5e1008a3a6aa0ca7f959cbe330d (patch) | |
tree | e4ab35e4a636c4bef241a656365be9a40b8fce29 /src/components/moderation/LabelsOnMe.tsx | |
parent | 4d97a2aa16083887a9b346d82e3b865e8a000355 (diff) | |
download | voidsky-76f493c27958d5e1008a3a6aa0ca7f959cbe330d.tar.zst |
Ensure profile labels can be appealed separately from account labels (#5154)
Diffstat (limited to 'src/components/moderation/LabelsOnMe.tsx')
-rw-r--r-- | src/components/moderation/LabelsOnMe.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/components/moderation/LabelsOnMe.tsx b/src/components/moderation/LabelsOnMe.tsx index 95b5853cf..33ede3ed2 100644 --- a/src/components/moderation/LabelsOnMe.tsx +++ b/src/components/moderation/LabelsOnMe.tsx @@ -14,19 +14,18 @@ import { } from '#/components/moderation/LabelsOnMeDialog' export function LabelsOnMe({ - details, + type, labels, size, style, }: { - details: {did: string} | {uri: string; cid: string} + type: 'account' | 'content' labels: ComAtprotoLabelDefs.Label[] | undefined size?: ButtonSize style?: StyleProp<ViewStyle> }) { const {_} = useLingui() const {currentAccount} = useSession() - const isAccount = 'did' in details const control = useLabelsOnMeDialogControl() if (!labels || !currentAccount) { @@ -39,7 +38,7 @@ export function LabelsOnMe({ return ( <View style={[a.flex_row, style]}> - <LabelsOnMeDialog control={control} subject={details} labels={labels} /> + <LabelsOnMeDialog control={control} labels={labels} type={type} /> <Button variant="solid" @@ -51,7 +50,7 @@ export function LabelsOnMe({ }}> <ButtonIcon position="left" icon={CircleInfo} /> <ButtonText style={[a.leading_snug]}> - {isAccount ? ( + {type === 'account' ? ( <Plural value={labels.length} one="# label has been placed on this account" @@ -82,6 +81,6 @@ export function LabelsOnMyPost({ return null } return ( - <LabelsOnMe details={post} labels={post.labels} size="tiny" style={style} /> + <LabelsOnMe type="content" labels={post.labels} size="tiny" style={style} /> ) } |