diff --git a/src/view/com/util/moderation/ScreenHider.tsx b/src/view/com/util/moderation/ScreenHider.tsx index 946f937e9e..8d03fbece9 100644 --- a/src/view/com/util/moderation/ScreenHider.tsx +++ b/src/view/com/util/moderation/ScreenHider.tsx @@ -22,6 +22,7 @@ import {Trans, msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useModalControls} from '#/state/modals' import {s} from '#/lib/styles' +import {CenteredView} from '../Views' export function ScreenHider({ testID, @@ -53,41 +54,56 @@ export function ScreenHider({ ) } + const isNoPwi = + moderation.cause?.type === 'label' && + moderation.cause?.labelDef.id === '!no-unauthenticated' const desc = describeModerationCause(moderation.cause, 'account') return ( - + - Content Warning + {isNoPwi ? ( + Sign-in Required + ) : ( + Content Warning + )} - This {screenDescription} has been flagged: - - {desc.name}. - - { - openModal({ - name: 'moderation-details', - context: 'account', - moderation, - }) - }} - accessibilityRole="button" - accessibilityLabel={_(msg`Learn more about this warning`)} - accessibilityHint=""> - - Learn More - - + {isNoPwi ? ( + + This account has requested that users sign in to view their profile. + + ) : ( + <> + This {screenDescription} has been flagged: + + {desc.name}. + + { + openModal({ + name: 'moderation-details', + context: 'account', + moderation, + }) + }} + accessibilityRole="button" + accessibilityLabel={_(msg`Learn more about this warning`)} + accessibilityHint=""> + + Learn More + + + + )}{' '} {isMobile && } @@ -116,7 +132,7 @@ export function ScreenHider({ )} - + ) }