Clean up state
This commit is contained in:
@@ -40,6 +40,7 @@ function Inner({style}: ViewStyleProp & {}) {
|
||||
const copy = useAgeAssuranceCopy()
|
||||
const {assurance} = useAgeInfo()
|
||||
const isBlocked = assurance.status === 'blocked'
|
||||
const hasInitiated = !!assurance.lastInitiatedAt
|
||||
const timeAgo = assurance.lastInitiatedAt
|
||||
? getTimeAgo(assurance.lastInitiatedAt, new Date())
|
||||
: null
|
||||
@@ -118,10 +119,10 @@ function Inner({style}: ViewStyleProp & {}) {
|
||||
label={_(msg`Verify now`)}
|
||||
size="small"
|
||||
variant="solid"
|
||||
color={assurance.hasInitiated ? 'secondary' : 'primary'}
|
||||
color={hasInitiated ? 'secondary' : 'primary'}
|
||||
onPress={() => control.open()}>
|
||||
<ButtonText>
|
||||
{assurance.hasInitiated ? (
|
||||
{hasInitiated ? (
|
||||
<Trans>Verify again</Trans>
|
||||
) : (
|
||||
<Trans>Verify now</Trans>
|
||||
|
||||
@@ -26,7 +26,6 @@ export function AgeRestrictedScreen({
|
||||
const copy = useAgeAssuranceCopy()
|
||||
const {isLoaded, assurance} = useAgeInfo()
|
||||
|
||||
if (assurance.isExempt) return children
|
||||
if (!isLoaded) {
|
||||
return (
|
||||
<Layout.Screen>
|
||||
|
||||
Reference in New Issue
Block a user