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