Skip to content

Commit 86932d7

Browse files
committed
skip usual onboarding for invited partners
1 parent 700531d commit 86932d7

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

apps/web/app/(ee)/partners.dub.co/(onboarding)/onboarding/onboarding-form.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ export function OnboardingForm({
9494
redirectPath: searchParams.get("next"),
9595
currentUrl: window.location.href,
9696
});
97-
router.push(
98-
`/onboarding/platforms${next ? `?next=${encodeURIComponent(next)}` : ""}`,
99-
);
97+
if (next) {
98+
router.push(next);
99+
} else {
100+
router.push("/onboarding/platforms");
101+
}
100102
},
101103
onError: ({ error, input }) => {
102104
toast.error(parseActionError(error, "An unknown error occurred."));

apps/web/app/(ee)/partners.dub.co/(onboarding)/onboarding/payouts/payout-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function PayoutProvider({
6262
<ConnectPayoutButton text="Connect payouts" />
6363

6464
<Link
65-
href={next ?? "/programs"}
65+
href="/programs"
6666
className="text-sm font-medium text-neutral-500 transition-colors hover:text-neutral-800"
6767
>
6868
I'll complete this later

apps/web/app/(ee)/partners.dub.co/(onboarding)/onboarding/platforms/page-client.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ export function OnboardingPlatformsPageClient({
2121
return (
2222
<>
2323
<PartnerPlatformsForm
24-
onSubmitSuccessful={() =>
25-
router.push(
26-
`/onboarding/payouts${next ? `?next=${encodeURIComponent(next)}` : ""}`,
27-
)
28-
}
24+
onSubmitSuccessful={() => router.push("/onboarding/payouts")}
2925
partner={partner}
3026
variant="onboarding"
3127
/>
3228
<Link
33-
href={`/onboarding/payouts${next ? `?next=${encodeURIComponent(next)}` : ""}`}
29+
href="/onboarding/payouts"
3430
className="text-sm font-medium text-neutral-500 transition-colors hover:text-neutral-800"
3531
>
3632
I'll complete this later

0 commit comments

Comments
 (0)