fix social-app patch
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
--- a/src/screens/Signup/StepInfo/index.tsx
|
||||
+++ b/src/screens/Signup/StepInfo/index.tsx
|
||||
@@ -9,44 +9,17 @@
|
||||
@@ -8,46 +8,18 @@
|
||||
import {isEmailMaybeInvalid} from '#/lib/strings/email'
|
||||
import {logger} from '#/logger'
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {useSignupContext} from '#/screens/Signup/state'
|
||||
-import {Policies} from '#/screens/Signup/StepInfo/Policies'
|
||||
import {atoms as a, native} from '#/alf'
|
||||
@@ -26,6 +26,8 @@
|
||||
- MIN_ACCESS_AGE,
|
||||
- useAgeAssuranceRegionConfigWithFallback,
|
||||
-} from '#/ageAssurance/util'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
-import {IS_NATIVE} from '#/env'
|
||||
-import {
|
||||
- useDeviceGeolocationApi,
|
||||
- useIsDeviceGeolocationGranted,
|
||||
@@ -45,12 +47,12 @@
|
||||
export function StepInfo({
|
||||
onPressBack,
|
||||
isServerError,
|
||||
@@ -70,21 +43,6 @@
|
||||
@@ -72,22 +44,7 @@
|
||||
|
||||
const emailInputRef = useRef<TextInput>(null)
|
||||
const passwordInputRef = useRef<TextInput>(null)
|
||||
- const birthdateInputRef = useRef<DateFieldRef>(null)
|
||||
-
|
||||
|
||||
- const aaRegionConfig = useAgeAssuranceRegionConfigWithFallback()
|
||||
- const {setDeviceGeolocation} = useDeviceGeolocationApi()
|
||||
- const locationControl = Dialog.useDialogControl()
|
||||
@@ -64,10 +66,11 @@
|
||||
- ? !isUnderAge(state.dateOfBirth.toISOString(), 18)
|
||||
- : true
|
||||
- const isDeviceGeolocationGranted = useIsDeviceGeolocationGranted()
|
||||
|
||||
-
|
||||
const [hasWarnedEmail, setHasWarnedEmail] = React.useState<boolean>(false)
|
||||
|
||||
@@ -105,10 +63,6 @@
|
||||
const tldtsRef = React.useRef<typeof tldts>(undefined)
|
||||
@@ -107,10 +64,6 @@
|
||||
const emailChanged = prevEmailValueRef.current !== email
|
||||
const password = passwordValueRef.current
|
||||
|
||||
@@ -78,7 +81,7 @@
|
||||
if (state.serviceDescription?.inviteCodeRequired && !inviteCode) {
|
||||
return dispatch({
|
||||
type: 'setError',
|
||||
@@ -275,107 +229,16 @@
|
||||
@@ -273,107 +226,16 @@
|
||||
secureTextEntry
|
||||
autoComplete="new-password"
|
||||
autoCapitalize="none"
|
||||
@@ -91,7 +94,7 @@
|
||||
passwordRules="minlength: 8;"
|
||||
/>
|
||||
</TextField.Root>
|
||||
</View>
|
||||
- </View>
|
||||
- <View>
|
||||
- <DateField.LabelText>
|
||||
- <Trans>Your birth date</Trans>
|
||||
@@ -110,7 +113,7 @@
|
||||
- accessibilityHint={_(msg`Select your date of birth`)}
|
||||
- maximumDate={new Date()}
|
||||
- />
|
||||
- </View>
|
||||
</View>
|
||||
-
|
||||
- <View style={[a.gap_sm]}>
|
||||
- <Policies serviceDescription={state.serviceDescription} />
|
||||
@@ -133,7 +136,7 @@
|
||||
- </Trans>
|
||||
- )}
|
||||
- </Admonition.Text>
|
||||
- {isNative &&
|
||||
- {IS_NATIVE &&
|
||||
- !isDeviceGeolocationGranted &&
|
||||
- isOverAppMinAccessAge && (
|
||||
- <Admonition.Text>
|
||||
@@ -165,7 +168,7 @@
|
||||
- ) : undefined}
|
||||
- </View>
|
||||
-
|
||||
- {isNative && (
|
||||
- {IS_NATIVE && (
|
||||
- <DeviceLocationRequestDialog
|
||||
- control={locationControl}
|
||||
- onLocationAcquired={props => {
|
||||
|
||||
Reference in New Issue
Block a user