Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Tweak middlware

Tim Wilson00ae5c172824
diff --git a/apps/web/lib/middleware/app.ts b/apps/web/lib/middleware/app.ts
index 4a744b90d9..5c949cc74c 100644
--- a/apps/web/lib/middleware/app.ts
+++ b/apps/web/lib/middleware/app.ts
@@ -34,12 +34,12 @@ export default async function AppMiddleware(req: NextRequest) {
/* Onboarding redirects
- User was created less than a day ago
- - User has no workspaces
- User is not invited to a workspace (redirect straight to the workspace)
- The path does not start with /onboarding
*/
} else if (
new Date(user.createdAt).getTime() > Date.now() - 60 * 60 * 24 * 1000 &&
+ !isWorkspaceInvite &&
!path.startsWith("/onboarding")
) {
let step = await getOnboardingStep(user);