Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: prevent login/signup request when loading

ammarahm-ede11959024986
diff --git a/apps/mobile/app/components/auth/signup.js b/apps/mobile/app/components/auth/signup.js
index c01a3072f..6fd4f250b 100644
--- a/apps/mobile/app/components/auth/signup.js
+++ b/apps/mobile/app/components/auth/signup.js
@@ -67,6 +67,7 @@ export const Signup = ({ changeMode, trial }) => {
const signup = async () => {
if (!validateInfo() || error) return;
+ if (loading) return;
setLoading(true);
try {
await db.user.signup(email.current.toLowerCase(), password.current);
diff --git a/apps/mobile/app/components/auth/use-login.js b/apps/mobile/app/components/auth/use-login.js
index 84393efec..dbd392a29 100644
--- a/apps/mobile/app/components/auth/use-login.js
+++ b/apps/mobile/app/components/auth/use-login.js
@@ -64,6 +64,7 @@ export const useLogin = (onFinishLogin) => {
const login = async () => {
if (!validateInfo() || error) return;
try {
+ if (loading) return;
setLoading(true);
switch (step) {
case LoginSteps.emailAuth: {