Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ export function OnboardingForm({
redirectPath: searchParams.get("next"),
currentUrl: window.location.href,
});
router.push(
`/onboarding/platforms${next ? `?next=${encodeURIComponent(next)}` : ""}`,
);
if (next) {
router.push(next);
} else {
router.push("/onboarding/platforms");
}
},
onError: ({ error, input }) => {
toast.error(parseActionError(error, "An unknown error occurred."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function PayoutProvider({
<ConnectPayoutButton text="Connect payouts" />

<Link
href={next ?? "/programs"}
href="/programs"
className="text-sm font-medium text-neutral-500 transition-colors hover:text-neutral-800"
>
I'll complete this later
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ export function OnboardingPlatformsPageClient({
return (
<>
<PartnerPlatformsForm
onSubmitSuccessful={() =>
router.push(
`/onboarding/payouts${next ? `?next=${encodeURIComponent(next)}` : ""}`,
)
}
onSubmitSuccessful={() => router.push("/onboarding/payouts")}
partner={partner}
variant="onboarding"
/>
<Link
href={`/onboarding/payouts${next ? `?next=${encodeURIComponent(next)}` : ""}`}
href="/onboarding/payouts"
className="text-sm font-medium text-neutral-500 transition-colors hover:text-neutral-800"
>
I'll complete this later
Expand Down
Loading