We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 699cc0c commit 2963124Copy full SHA for 2963124
1 file changed
middleware.ts
@@ -121,6 +121,10 @@ export async function middleware(req: NextRequest) {
121
if (pathname.startsWith(USER_SIGNUP_PREFIX)) {
122
return redirect(ORG_DASHBOARD_PATH);
123
}
124
+ // If org profile is already complete, redirect away from any org signup routes to dashboard
125
+ if (profileComplete && pathname.startsWith(ORG_SIGNUP_PREFIX)) {
126
+ return redirect(ORG_DASHBOARD_PATH);
127
+ }
128
// Orgs should not access user dashboard or profile page
129
if (onUserDashboard || onProfile) return redirect(ORG_DASHBOARD_PATH);
130
0 commit comments