From a31885e265ccf7dda3f9d9c5e2f4907b4f539180 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 10 Apr 2026 21:43:48 +0100 Subject: [PATCH] feat: add returnUrl params --- apps/web/src/components/Dashboard.tsx | 2 +- apps/web/src/components/WorkspaceMenu.tsx | 2 +- .../src/views/onboarding/select-plan/index.tsx | 15 +++++---------- .../views/onboarding/workspace-details/index.tsx | 5 +++-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/apps/web/src/components/Dashboard.tsx b/apps/web/src/components/Dashboard.tsx index e3aa8390..ecff8acb 100644 --- a/apps/web/src/components/Dashboard.tsx +++ b/apps/web/src/components/Dashboard.tsx @@ -102,7 +102,7 @@ export default function Dashboard({ useEffect(() => { if (hasLoaded && availableWorkspaces.length === 0) { if (env("NEXT_PUBLIC_KAN_ENV") === "cloud") { - router.push("/onboarding/select-plan"); + router.push(`/onboarding/select-plan?returnUrl=${encodeURIComponent(window.location.pathname)}`); } else { openModal("NEW_WORKSPACE", undefined, undefined, false); } diff --git a/apps/web/src/components/WorkspaceMenu.tsx b/apps/web/src/components/WorkspaceMenu.tsx index 36f5240f..7d8f2ef5 100644 --- a/apps/web/src/components/WorkspaceMenu.tsx +++ b/apps/web/src/components/WorkspaceMenu.tsx @@ -152,7 +152,7 @@ export default function WorkspaceMenu({