fix: skip plan on invite to team (#25924)
* fix: skip plan on invite to team * address cubic
This commit is contained in:
1 parent
45fcabef8c
commit
94e0d476d9
2 files changed
+35
No files matched your search
@@ -64,5 +64,19 @@ export async function checkOnboardingRedirect(
|
||||
// Determine which onboarding path to use
|
||||
const onboardingV3Enabled = await featuresRepository.checkIfFeatureIsEnabledGlobally("onboarding-v3");
|
||||
|
||||
const pendingInvite = await prisma.membership.findFirst({
|
||||
where: {
|
||||
userId: userId,
|
||||
accepted: false,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (pendingInvite && onboardingV3Enabled) {
|
||||
return "/onboarding/personal/settings";
|
||||
}
|
||||
|
||||
return onboardingV3Enabled ? "/onboarding/getting-started" : "/getting-started";
|
||||
}
|
||||
Reference in new issue
Block a user