Various fixes on table, board, tasks (#983)
* Misc fixes * Misc fixes * Misc fixes * Fix login
This commit is contained in:
@ -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],
|
||||
);
|
||||
|
||||
@ -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',
|
||||
|
||||
Reference in New Issue
Block a user