mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-06 21:22:36 +00:00
chore: update auth service
This commit is contained in:
@ -7,7 +7,6 @@ import { authServiceClient } from "@/grpcweb";
|
||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||
import useUserStore from "@/stores/v1/user";
|
||||
import useWorkspaceStore from "@/stores/v1/workspace";
|
||||
import { setAccessToken } from "@/utils/auth";
|
||||
import useLoading from "../hooks/useLoading";
|
||||
|
||||
const SignUp: React.FC = () => {
|
||||
@ -52,14 +51,13 @@ const SignUp: React.FC = () => {
|
||||
|
||||
try {
|
||||
actionBtnLoadingState.setLoading();
|
||||
const { user, accessToken } = await authServiceClient.signUp({
|
||||
const { user } = await authServiceClient.signUp({
|
||||
email,
|
||||
nickname,
|
||||
password,
|
||||
});
|
||||
if (user) {
|
||||
userStore.setCurrentUserId(user.id);
|
||||
setAccessToken(accessToken);
|
||||
await userStore.fetchCurrentUser();
|
||||
navigateTo("/");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user