Fix keyboard activation for signin button (#11308)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import {useEffect, useState} from 'react'
|
||||
import {Pressable, View} from 'react-native'
|
||||
import {ImageBackground} from 'expo-image'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
import {Trans, useLingui} from '@lingui/react/macro'
|
||||
import {FocusGuards, FocusScope} from 'radix-ui/internal'
|
||||
|
||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||
@@ -22,7 +20,7 @@ interface WelcomeModalProps {
|
||||
}
|
||||
|
||||
export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
const ax = useAnalytics()
|
||||
const {requestSwitchToAccount} = useLoggedOutViewControls()
|
||||
const {gtMobile} = useBreakpoints()
|
||||
@@ -152,7 +150,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
<View>
|
||||
<Button
|
||||
onPress={onPressCreateAccount}
|
||||
label={_(msg`Create account`)}
|
||||
label={l`Create account`}
|
||||
size="large"
|
||||
color="primary"
|
||||
style={{
|
||||
@@ -165,7 +163,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
</Button>
|
||||
<Button
|
||||
onPress={onPressExplore}
|
||||
label={_(msg`Explore the app`)}
|
||||
label={l`Explore the app`}
|
||||
size="large"
|
||||
color="primary"
|
||||
variant="ghost"
|
||||
@@ -188,10 +186,11 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
]}>
|
||||
<Trans>Already have an account?</Trans>{' '}
|
||||
<Pressable
|
||||
onPress={onPressSignIn}
|
||||
onPointerEnter={() => setSignInLinkHovered(true)}
|
||||
onPointerLeave={() => setSignInLinkHovered(false)}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={_(msg`Sign in`)}
|
||||
accessibilityLabel={l`Sign in`}
|
||||
accessibilityHint="">
|
||||
<Text
|
||||
style={[
|
||||
@@ -201,8 +200,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
fontSize: undefined,
|
||||
},
|
||||
signInLinkHovered && a.underline,
|
||||
]}
|
||||
onPress={onPressSignIn}>
|
||||
]}>
|
||||
<Trans>Sign in</Trans>
|
||||
</Text>
|
||||
</Pressable>
|
||||
@@ -211,7 +209,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
</View>
|
||||
</View>
|
||||
<Button
|
||||
label={_(msg`Close welcome modal`)}
|
||||
label={l`Close welcome modal`}
|
||||
style={[
|
||||
a.absolute,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user