isUnderage -> isDeclaredUnderage
This commit is contained in:
@@ -20,10 +20,10 @@ import {createStaticClick, InlineLinkText} from '#/components/Link'
|
||||
import {Text} from '#/components/Typography'
|
||||
|
||||
export function AgeAssuranceAccountCard({style}: ViewStyleProp & {}) {
|
||||
const {isReady, isAgeRestricted, isUnderage} = useAgeAssurance()
|
||||
const {isReady, isAgeRestricted, isDeclaredUnderage} = useAgeAssurance()
|
||||
|
||||
if (!isReady) return null
|
||||
if (isUnderage) return null
|
||||
if (isDeclaredUnderage) return null
|
||||
if (!isAgeRestricted) return null
|
||||
|
||||
return <Inner style={style} />
|
||||
|
||||
@@ -15,10 +15,10 @@ export function AgeAssuranceAdmonition({
|
||||
style,
|
||||
}: ViewStyleProp & {children: React.ReactNode}) {
|
||||
const control = useDialogControl()
|
||||
const {isReady, isUnderage, isAgeRestricted} = useAgeAssurance()
|
||||
const {isReady, isDeclaredUnderage, isAgeRestricted} = useAgeAssurance()
|
||||
|
||||
if (!isReady) return null
|
||||
if (isUnderage) return null
|
||||
if (isDeclaredUnderage) return null
|
||||
if (!isAgeRestricted) return null
|
||||
|
||||
return (
|
||||
|
||||
@@ -12,14 +12,15 @@ import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
||||
|
||||
export function AgeAssuranceDismissableNotice({style}: ViewStyleProp & {}) {
|
||||
const {_} = useLingui()
|
||||
const {isReady, isUnderage, isAgeRestricted, assurance} = useAgeAssurance()
|
||||
const {isReady, isDeclaredUnderage, isAgeRestricted, assurance} =
|
||||
useAgeAssurance()
|
||||
const {nux} = useNux(Nux.AgeAssuranceDismissableNotice)
|
||||
const copy = useAgeAssuranceCopy()
|
||||
const {mutate: save, variables} = useSaveNux()
|
||||
const hidden = !!variables
|
||||
|
||||
if (!isReady) return null
|
||||
if (isUnderage) return null
|
||||
if (isDeclaredUnderage) return null
|
||||
if (!isAgeRestricted) return null
|
||||
if (assurance.lastInitiatedAt) return null
|
||||
if (hidden) return null
|
||||
|
||||
Reference in New Issue
Block a user