fix: onboarding - team invites (#27113)
This commit is contained in:
1 parent
02824b17c3
commit
09194c58e1
7 files changed
+61
-13
No files matched your search
@@ -25,10 +25,10 @@ const ServerPage = async () => {
|
||||
return redirect("/auth/login");
|
||||
}
|
||||
|
||||
// If user has pending team invites, redirect them directly to personal onboarding
|
||||
// This handles the case where users sign up with an invite token and are redirected here
|
||||
const hasPendingInvite = await MembershipRepository.hasPendingInviteByUserId({ userId: session.user.id });
|
||||
if (hasPendingInvite) {
|
||||
// If user has any team membership (pending or accepted), redirect them directly to personal onboarding
|
||||
// This handles the case where users sign up with an invite token (membership is auto-accepted)
|
||||
const hasTeamMembership = await MembershipRepository.hasAnyTeamMembershipByUserId({ userId: session.user.id });
|
||||
if (hasTeamMembership) {
|
||||
return redirect("/onboarding/personal/settings");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user