a few starting changes
This commit is contained in:
@@ -4,3 +4,5 @@ export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as
|
||||
| 'info'
|
||||
| 'warn'
|
||||
| 'error'
|
||||
|
||||
export const GCP_PROJECT_ID = Number(process.env.EXPO_PUBLIC_GCP_PROJECT_ID)
|
||||
|
||||
@@ -6,6 +6,7 @@ import {nanoid} from 'nanoid/non-secure'
|
||||
|
||||
import {createFullHandle} from '#/lib/strings/handles'
|
||||
import {logger} from '#/logger'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {ScreenTransition} from '#/screens/Login/ScreenTransition'
|
||||
import {useSignupContext} from '#/screens/Signup/state'
|
||||
import {CaptchaWebView} from '#/screens/Signup/StepCaptcha/CaptchaWebView'
|
||||
@@ -13,7 +14,9 @@ import {atoms as a, useTheme} from '#/alf'
|
||||
import {FormError} from '#/components/forms/FormError'
|
||||
import {BackNextButtons} from '../BackNextButtons'
|
||||
|
||||
const CAPTCHA_PATH = '/gate/signup'
|
||||
const CAPTCHA_PATH = isWeb ? '/gate/signup' : '/gate/signup/attempt-attest'
|
||||
|
||||
type
|
||||
|
||||
export function StepCaptcha() {
|
||||
const {_} = useLingui()
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import {useEffect, useReducer, useState} from 'react'
|
||||
import {AppState, type AppStateStatus, View} from 'react-native'
|
||||
import ReactNativeDeviceAttest from 'react-native-device-attest'
|
||||
import Animated, {FadeIn, LayoutAnimationConfig} from 'react-native-reanimated'
|
||||
import {AppBskyGraphStarterpack} from '@atproto/api'
|
||||
import {msg, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
import {FEEDBACK_FORM_URL} from '#/lib/constants'
|
||||
import {isAndroid} from '#/platform/detection'
|
||||
import {useServiceQuery} from '#/state/queries/service'
|
||||
import {useStarterPackQuery} from '#/state/queries/starter-packs'
|
||||
import {useActiveStarterPack} from '#/state/shell/starter-pack'
|
||||
@@ -26,6 +28,7 @@ import {Divider} from '#/components/Divider'
|
||||
import {LinearGradientBackground} from '#/components/LinearGradientBackground'
|
||||
import {InlineLinkText} from '#/components/Link'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {GCP_PROJECT_ID} from '#/env'
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
export function Signup({onPressBack}: {onPressBack: () => void}) {
|
||||
@@ -101,6 +104,14 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
|
||||
return () => subscription.remove()
|
||||
}, [])
|
||||
|
||||
// On Android, warmup the Play Integrity API on the signup screen so it is ready by the time we get to the gate screen.
|
||||
useEffect(() => {
|
||||
if (!isAndroid) {
|
||||
return
|
||||
}
|
||||
ReactNativeDeviceAttest.warumpIntegrity(GCP_PROJECT_ID)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<SignupContext.Provider value={{state, dispatch}}>
|
||||
<LoggedOutLayout
|
||||
|
||||
Reference in New Issue
Block a user