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:
@@ -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",
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
Reference in New Issue
Block a user