dry up cta
This commit is contained in:
@@ -332,6 +332,11 @@ function AccessSection() {
|
|||||||
: null
|
: null
|
||||||
const allowsDeviceVerification =
|
const allowsDeviceVerification =
|
||||||
region && regionAllowsDeviceVerification(region)
|
region && regionAllowsDeviceVerification(region)
|
||||||
|
const verifyCta = hasInitiated
|
||||||
|
? _(msg`Verify again`)
|
||||||
|
: allowsDeviceVerification
|
||||||
|
? _(msg`Share age data`)
|
||||||
|
: _(msg`Verify now`)
|
||||||
|
|
||||||
const [isVerifyingDevice, setIsVerifyingDevice] = useState(false)
|
const [isVerifyingDevice, setIsVerifyingDevice] = useState(false)
|
||||||
|
|
||||||
@@ -444,27 +449,13 @@ function AccessSection() {
|
|||||||
<>
|
<>
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
<Button
|
<Button
|
||||||
label={
|
label={verifyCta}
|
||||||
hasInitiated
|
|
||||||
? _(msg`Verify again`)
|
|
||||||
: allowsDeviceVerification
|
|
||||||
? _(msg`Share age data`)
|
|
||||||
: _(msg`Verify now`)
|
|
||||||
}
|
|
||||||
size="large"
|
size="large"
|
||||||
color={hasInitiated ? 'secondary' : 'primary'}
|
color={hasInitiated ? 'secondary' : 'primary'}
|
||||||
disabled={isVerifyingDevice}
|
disabled={isVerifyingDevice}
|
||||||
onPress={() => void onPressVerify()}>
|
onPress={() => void onPressVerify()}>
|
||||||
<ButtonIcon icon={isVerifyingDevice ? Loader : ShieldIcon} />
|
<ButtonIcon icon={isVerifyingDevice ? Loader : ShieldIcon} />
|
||||||
<ButtonText>
|
<ButtonText>{verifyCta}</ButtonText>
|
||||||
{hasInitiated ? (
|
|
||||||
<Trans>Verify again</Trans>
|
|
||||||
) : allowsDeviceVerification ? (
|
|
||||||
<Trans>Share age data</Trans>
|
|
||||||
) : (
|
|
||||||
<Trans>Verify now</Trans>
|
|
||||||
)}
|
|
||||||
</ButtonText>
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{allowsDeviceVerification && (
|
{allowsDeviceVerification && (
|
||||||
|
|||||||
Reference in New Issue
Block a user