-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(auth2): manage terrible ios keyboard
- Loading branch information
Showing
8 changed files
with
44 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,14 @@ import { useRecaptcha } from "app/Components/Recaptcha/Recaptcha" | |
import { AuthContext } from "app/Scenes/Onboarding/Auth2/AuthContext" | ||
import { useAuthNavigation } from "app/Scenes/Onboarding/Auth2/hooks/useAuthNavigation" | ||
import { useInputAutofocus } from "app/Scenes/Onboarding/Auth2/hooks/useInputAutofocus" | ||
import { waitForSubmit } from "app/Scenes/Onboarding/Auth2/utils/waitForSubmit" | ||
import { AuthPromiseRejectType, AuthPromiseResolveType } from "app/store/AuthModel" | ||
import { GlobalStore } from "app/store/GlobalStore" | ||
import { navigate } from "app/system/navigation/navigate" | ||
import { osMajorVersion } from "app/utils/platformUtil" | ||
import { Formik, useFormikContext } from "formik" | ||
import { MotiView } from "moti" | ||
import React, { useRef, useState } from "react" | ||
import { Alert, Image, InteractionManager, Keyboard, Platform } from "react-native" | ||
import { Alert, Image, InteractionManager, Platform } from "react-native" | ||
import { Easing } from "react-native-reanimated" | ||
import * as Yup from "yup" | ||
|
||
|
@@ -49,8 +48,6 @@ export const LoginWelcomeStep: React.FC = () => { | |
.required("Email field is required"), | ||
})} | ||
onSubmit={async ({ email }, { resetForm }) => { | ||
Keyboard.dismiss() | ||
|
||
// FIXME | ||
if (!token) { | ||
Alert.alert("Something went wrong. Please try again, or contact [email protected]") | ||
|
@@ -59,8 +56,6 @@ export const LoginWelcomeStep: React.FC = () => { | |
|
||
const res = await GlobalStore.actions.auth.verifyUser({ email, recaptchaToken: token }) | ||
|
||
await waitForSubmit() | ||
|
||
if (res === "user_exists") { | ||
navigation.navigate({ name: "LoginPasswordStep", params: { email } }) | ||
} else if (res === "user_does_not_exist") { | ||
|
@@ -121,6 +116,7 @@ const LoginWelcomeStepForm: React.FC = () => { | |
autoCapitalize="none" | ||
autoComplete="email" | ||
autoCorrect={false} | ||
blurOnSubmit={false} | ||
error={errors.email} | ||
placeholderTextColor={color("black30")} | ||
ref={emailRef} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters