mobile: prevent login/signup request when loading

This commit is contained in:
ammarahm-ed
2023-09-04 14:27:15 +05:00
parent ace2dfac30
commit e119590249
2 changed files with 2 additions and 0 deletions

View File

@@ -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);

View File

@@ -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: {