Various fixes on table, board, tasks (#983)

* Misc fixes

* Misc fixes

* Misc fixes

* Fix login
This commit is contained in:
Charles Bochet
2023-07-28 15:20:32 -07:00
committed by GitHub
parent 0bc80ce9ee
commit 557e56492a
17 changed files with 53 additions and 177 deletions

View File

@ -77,7 +77,7 @@ export function useAuth() {
const { loginToken } = await handleChallenge(email, password);
const { user } = await handleVerify(loginToken.token);
return { user };
return user;
},
[handleChallenge, handleVerify],
);
@ -112,7 +112,7 @@ export function useAuth() {
signUpResult.data?.signUp.loginToken.token,
);
return { user };
return user;
},
[signUp, handleVerify],
);

View File

@ -105,16 +105,21 @@ export function useSignInUp() {
if (!data.email || !data.password) {
throw new Error('Email and password are required');
}
let user;
if (signInUpMode === SignInUpMode.SignIn) {
await signInWithCredentials(data.email, data.password);
user = await signInWithCredentials(data.email, data.password);
} else {
await signUpWithCredentials(
user = await signUpWithCredentials(
data.email,
data.password,
workspaceInviteHash,
);
}
navigate('/create/workspace');
if (user?.workspaceMember?.workspace?.displayName) {
navigate('/');
} else {
navigate('/create/workspace');
}
} catch (err: any) {
enqueueSnackBar(err?.message, {
variant: 'error',