Update copy
This commit is contained in:
@@ -2,21 +2,13 @@ import {useMemo} from 'react'
|
|||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {useAgeAssurance} from '#/ageAssurance'
|
|
||||||
|
|
||||||
export function useAgeAssuranceCopy() {
|
export function useAgeAssuranceCopy() {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const aa = useAgeAssurance()
|
|
||||||
|
|
||||||
return useMemo(() => {
|
return useMemo(() => {
|
||||||
return {
|
return {
|
||||||
notice:
|
notice: _(
|
||||||
aa.state.access === aa.Access.Safe
|
|
||||||
? _(
|
|
||||||
msg`Due to laws in your region, certain features on Bluesky are currently restricted until you're able to verify you're an adult.`,
|
msg`Due to laws in your region, certain features on Bluesky are currently restricted until you're able to verify you're an adult.`,
|
||||||
)
|
|
||||||
: _(
|
|
||||||
msg`The laws in your location require you to verify you're an adult before accessing certain features on Bluesky, like adult content and direct messaging.`,
|
|
||||||
),
|
),
|
||||||
banner: _(
|
banner: _(
|
||||||
msg`The laws in your location require you to verify you're an adult to access certain features. Tap to learn more.`,
|
msg`The laws in your location require you to verify you're an adult to access certain features. Tap to learn more.`,
|
||||||
@@ -25,5 +17,5 @@ export function useAgeAssuranceCopy() {
|
|||||||
msg`Don't worry! All existing messages and settings are saved and will be available after you verify you're an adult.`,
|
msg`Don't worry! All existing messages and settings are saved and will be available after you verify you're an adult.`,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}, [_, aa])
|
}, [_])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import {useSetMinimalShellMode} from '#/state/shell'
|
|||||||
import {atoms as a, useBreakpoints, useTheme, type ViewStyleProp} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme, type ViewStyleProp} from '#/alf'
|
||||||
import {Admonition} from '#/components/Admonition'
|
import {Admonition} from '#/components/Admonition'
|
||||||
import {AgeAssuranceAdmonition} from '#/components/ageAssurance/AgeAssuranceAdmonition'
|
import {AgeAssuranceAdmonition} from '#/components/ageAssurance/AgeAssuranceAdmonition'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button} from '#/components/Button'
|
import {Button} from '#/components/Button'
|
||||||
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
@@ -167,6 +168,7 @@ export function ModerationScreenInner({
|
|||||||
} = useMyLabelersQuery()
|
} = useMyLabelersQuery()
|
||||||
const aa = useAgeAssurance()
|
const aa = useAgeAssurance()
|
||||||
const isBirthdateUpdateAllowed = useIsBirthdateUpdateAllowed()
|
const isBirthdateUpdateAllowed = useIsBirthdateUpdateAllowed()
|
||||||
|
const aaCopy = useAgeAssuranceCopy()
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
@@ -343,9 +345,7 @@ export function ModerationScreenInner({
|
|||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<AgeAssuranceAdmonition style={[a.pb_md]}>
|
<AgeAssuranceAdmonition style={[a.pb_md]}>
|
||||||
<Trans>
|
{aaCopy.notice}
|
||||||
You must complete age assurance in order to access content filters.
|
|
||||||
</Trans>
|
|
||||||
</AgeAssuranceAdmonition>
|
</AgeAssuranceAdmonition>
|
||||||
|
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
|
|||||||
Reference in New Issue
Block a user