From c4220580e5eab5269b9c0b44928e8b8361b9b44f Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 11 Sep 2025 13:56:58 +0100 Subject: [PATCH] refactor: various tweaks and fixes --- apps/web/src/components/NewWorkspaceForm.tsx | 20 ++++++++++++++----- apps/web/src/views/boards/index.tsx | 4 ++-- .../components/UpgradeToProConfirmation.tsx | 11 +++++++--- packages/shared/src/utils/subscriptions.ts | 2 +- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/apps/web/src/components/NewWorkspaceForm.tsx b/apps/web/src/components/NewWorkspaceForm.tsx index dd2545c7..3d0ccd5c 100644 --- a/apps/web/src/components/NewWorkspaceForm.tsx +++ b/apps/web/src/components/NewWorkspaceForm.tsx @@ -42,7 +42,7 @@ type FormValues = z.infer; export function NewWorkspaceForm() { const { closeModal } = useModal(); const { showPopup } = usePopup(); - const { switchWorkspace } = useWorkspace(); + const { switchWorkspace, availableWorkspaces } = useWorkspace(); const { register, handleSubmit, @@ -60,6 +60,8 @@ export function NewWorkspaceForm() { }); const utils = api.useUtils(); + const hasAvailableWorkspaces = availableWorkspaces.length > 0; + const isCloudEnv = env("NEXT_PUBLIC_KAN_ENV") === "cloud"; const slug = watch("slug"); @@ -209,7 +211,10 @@ export function NewWorkspaceForm() {