A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix incorrect params passed to login function
ammarahm-ed921436bfdb56
diff --git a/apps/mobile/src/components/auth/login.js b/apps/mobile/src/components/auth/login.jsindex e92ad06c9..864c1e851 100644--- a/apps/mobile/src/components/auth/login.js+++ b/apps/mobile/src/components/auth/login.js@@ -25,7 +25,7 @@ import Paragraph from '../ui/typography/paragraph';import { SVG } from './background';import { ForgotPassword } from './forgot-password';import TwoFactorVerification from './two-factor';-+import { Progress } from '../sheets/progress';export const Login = ({ changeMode }) => {const colors = useThemeStore(state => state.colors);const email = useRef();@@ -66,11 +66,12 @@ export const Login = ({ changeMode }) => {if (!validateInfo() || error) return;setLoading(true);let user;+ console.log(mfa);try {if (mfa) {- console.log('mfa details', mfa);await db.user.mfaLogin(email.current.toLowerCase(), password.current, mfa);} else {+ console.log(email.current, password.current);await db.user.login(email.current.toLowerCase(), password.current);}callback && callback(true);@@ -93,11 +94,7 @@ export const Login = ({ changeMode }) => {});eSendEvent('userLoggedIn', true);await sleep(500);- presentSheet({- title: 'Syncing your data',- paragraph: 'Please wait while we sync all your data.',- progress: true- });+ Progress.present();} catch (e) {callback && callback(false);console.log('Login error', e.message, e.data);@@ -209,6 +206,7 @@ export const Login = ({ changeMode }) => {onChangeText={value => {email.current = value;}}+ testID="input.email"onErrorCheck={e => setError(e)}returnKeyLabel="Next"returnKeyType="next"@@ -228,6 +226,7 @@ export const Login = ({ changeMode }) => {onChangeText={value => {password.current = value;}}+ testID="input.password"returnKeyLabel="Done"returnKeyType="done"secureTextEntry@@ -236,7 +235,7 @@ export const Login = ({ changeMode }) => {autoCorrect={false}placeholder="Password"marginBottom={0}- onSubmit={login}+ onSubmit={() => login()}/><Buttontitle="Forgot your password?"@@ -269,7 +268,7 @@ export const Login = ({ changeMode }) => {borderRadius: 100}}loading={loading}- onPress={login}+ onPress={() => login()}// width="100%"type="accent"title={loading ? null : 'Login to your account'}