forked from github/plane
chore: redirection to profile after workpace delete/leave (#2937)
This commit is contained in:
parent
6db28a234a
commit
a1adee47b8
@ -75,8 +75,7 @@ export const SignInView = observer(() => {
|
|||||||
const workspaceSlug =
|
const workspaceSlug =
|
||||||
userSettings?.workspace?.last_workspace_slug || userSettings?.workspace?.fallback_workspace_slug;
|
userSettings?.workspace?.last_workspace_slug || userSettings?.workspace?.fallback_workspace_slug;
|
||||||
if (workspaceSlug) router.push(`/${workspaceSlug}`);
|
if (workspaceSlug) router.push(`/${workspaceSlug}`);
|
||||||
else if (userSettings.workspace.invites > 0) router.push("/invitations");
|
else router.push("/profile");
|
||||||
else router.push("/create-workspace");
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
@ -40,14 +40,8 @@ const useUserAuth = (routeAuth: "sign-in" | "onboarding" | "admin" | null = "adm
|
|||||||
router.push(`/${userWorkspaces[0].slug}`);
|
router.push(`/${userWorkspaces[0].slug}`);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
const invitations = await workspaceService.userWorkspaceInvitations();
|
router.push(`/profile`);
|
||||||
if (invitations.length > 0) {
|
return;
|
||||||
router.push(`/invitations`);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
router.push(`/create-workspace`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user