From 0f08f2071084dd73e2cf32ee95b71f714584c22b Mon Sep 17 00:00:00 2001 From: Dominik Stumpf Date: Fri, 23 Aug 2024 14:55:57 +0200 Subject: [PATCH] Revert "chore: remove subscription logic" This reverts commit 887722b09e57049e3bc1822603f7758973b922c3. --- .../(onboarding)/{_choose-pass => choose-pass}/page.tsx | 0 .../create-profile/(onboarding)/claim-pass/page.tsx | 2 +- .../(onboarding)/{_purchase-pass => purchase-pass}/page.tsx | 0 .../create-profile/(onboarding)/start-profile/page.tsx | 5 ++++- 4 files changed, 5 insertions(+), 2 deletions(-) rename src/app/(marketing)/create-profile/(onboarding)/{_choose-pass => choose-pass}/page.tsx (100%) rename src/app/(marketing)/create-profile/(onboarding)/{_purchase-pass => purchase-pass}/page.tsx (100%) diff --git a/src/app/(marketing)/create-profile/(onboarding)/_choose-pass/page.tsx b/src/app/(marketing)/create-profile/(onboarding)/choose-pass/page.tsx similarity index 100% rename from src/app/(marketing)/create-profile/(onboarding)/_choose-pass/page.tsx rename to src/app/(marketing)/create-profile/(onboarding)/choose-pass/page.tsx diff --git a/src/app/(marketing)/create-profile/(onboarding)/claim-pass/page.tsx b/src/app/(marketing)/create-profile/(onboarding)/claim-pass/page.tsx index 97d676b5c1..04fa961544 100644 --- a/src/app/(marketing)/create-profile/(onboarding)/claim-pass/page.tsx +++ b/src/app/(marketing)/create-profile/(onboarding)/claim-pass/page.tsx @@ -50,7 +50,7 @@ const Page = () => { ...prev, referrerProfile: data.referrerProfile, })) - router.push("start-profile") + router.push("choose-pass") } }} /> diff --git a/src/app/(marketing)/create-profile/(onboarding)/_purchase-pass/page.tsx b/src/app/(marketing)/create-profile/(onboarding)/purchase-pass/page.tsx similarity index 100% rename from src/app/(marketing)/create-profile/(onboarding)/_purchase-pass/page.tsx rename to src/app/(marketing)/create-profile/(onboarding)/purchase-pass/page.tsx diff --git a/src/app/(marketing)/create-profile/(onboarding)/start-profile/page.tsx b/src/app/(marketing)/create-profile/(onboarding)/start-profile/page.tsx index 50d6e6ec62..01b7a15da0 100644 --- a/src/app/(marketing)/create-profile/(onboarding)/start-profile/page.tsx +++ b/src/app/(marketing)/create-profile/(onboarding)/start-profile/page.tsx @@ -14,9 +14,12 @@ const Page = () => { if (!data.referrerProfile) { router.replace("claim-pass") } + if (!data.subscription) { + router.replace("choose-pass") + } }, [data, router.replace]) - if (!data.referrerProfile) { + if (!data.subscription || !data.referrerProfile) { return }