The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
improve redirect logic
Steven Teyac13d86c0966
diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/page.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/page.tsxindex 8e33725776..e20e46a3f2 100644--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/page.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/page.tsx@@ -30,11 +30,11 @@ export default async function ApplicationPage(props: {!program.group.applicationFormPublishedAt) {// for the default group:- // - if the program is found, redirect to the marketplace program page+ // - if the program is featured on the marketplace (and not deactivated), redirect to the marketplace program page// - otherwise, throw 404// for other groups: redirect to the default group variantif (partnerGroupSlug === DEFAULT_PARTNER_GROUP.slug) {- if (program) {+ if (program && program.addedToMarketplaceAt && !program.deactivatedAt) {redirect(`/marketplace/${programSlug}`);}notFound();diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsxindex 4db7e547d9..69ba021b7e 100644--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsx@@ -66,11 +66,11 @@ export default async function SuccessPage(props: {!program.group.applicationFormPublishedAt) {// for the default group:- // - if the program is found, redirect to the marketplace program page+ // - if the program is featured on the marketplace (and not deactivated), redirect to the marketplace program page// - otherwise, throw 404// for other groups: redirect to the default group variantif (partnerGroupSlug === DEFAULT_PARTNER_GROUP.slug) {- if (program) {+ if (program && program.addedToMarketplaceAt && !program.deactivatedAt) {redirect(`/marketplace/${programSlug}`);}notFound();diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/page.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/page.tsxindex bb084d4277..2085e7d4b5 100644--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/page.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/page.tsx@@ -29,11 +29,11 @@ export default async function ApplyPage(props: {!program.group.landerPublishedAt) {// for the default group:- // - if the program is found, redirect to the marketplace program page+ // - if the program is featured on the marketplace (and not deactivated), redirect to the marketplace program page// - otherwise, throw 404// for other groups: redirect to the default group variantif (partnerGroupSlug === DEFAULT_PARTNER_GROUP.slug) {- if (program) {+ if (program && program.addedToMarketplaceAt && !program.deactivatedAt) {redirect(`/marketplace/${programSlug}`);}notFound();