feat(cloud): pro launch features (#170)

* fix: ensure workspace slug is updated on activation

* feat: open upgrade modal if upgrade=pro is in URL params

* fix: show correct skeleton loader for workspace menu when collapsed

* fix: reenable scroll when navigating back to marketing page

* feat: add launch offer notice
This commit is contained in:
Henry
2025-09-09 13:07:39 +01:00
committed by GitHub
parent 6c04a10b1f
commit 308cb22729
13 changed files with 245 additions and 201 deletions

View File

@@ -22,7 +22,7 @@ export function UpgradeToProConfirmation({
"Content-Type": "application/json",
},
body: JSON.stringify({
...(entityId && { workspaceSlug: entityId }),
...(entityId && { slug: entityId }),
workspacePublicId: workspacePublicId,
cancelUrl: "/settings",
successUrl: "/settings",

View File

@@ -95,6 +95,17 @@ export default function SettingsPage() {
}
}, [router.query.edit]);
// Open upgrade modal if upgrade=pro is in URL params
useEffect(() => {
if (
router.query.upgrade === "pro" &&
env("NEXT_PUBLIC_KAN_ENV") === "cloud" &&
!hasActiveSubscription(subscriptions, "pro")
) {
openModal("UPGRADE_TO_PRO");
}
}, [router.query.upgrade, subscriptions, openModal]);
const { mutateAsync: disconnectTrello } =
api.integration.disconnect.useMutation({
onSuccess: () => {