Skip to content

Scheduling infrastructure for absolutely everyone.

fix: hide "upgrade org banner" for isPlatform (#14522)

Peer Richelsen4c50b6a8afcd
diff --git a/packages/features/ee/organizations/components/OrgUpgradeBanner.tsx b/packages/features/ee/organizations/components/OrgUpgradeBanner.tsx
index 92b654f8072..920d57ddc2b 100644
--- a/packages/features/ee/organizations/components/OrgUpgradeBanner.tsx
+++ b/packages/features/ee/organizations/components/OrgUpgradeBanner.tsx
@@ -1,5 +1,6 @@
import { useRouter } from "next/navigation";
+import { useIsPlatform } from "@calcom/atoms/monorepo";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
@@ -12,6 +13,8 @@ export type OrgUpgradeBannerProps = {
export function OrgUpgradeBanner({ data }: OrgUpgradeBannerProps) {
const { t } = useLocale();
const router = useRouter();
+ const isPlatform = useIsPlatform();
+
const publishOrgMutation = trpc.viewer.organizations.publish.useMutation({
onSuccess(data) {
router.push(data.url);
@@ -25,6 +28,9 @@ export function OrgUpgradeBanner({ data }: OrgUpgradeBannerProps) {
const [membership] = data;
if (!membership) return null;
+ // TODO: later figure out how to not show this banner on platform since platform is different to orgs (it just uses the same code)
+ if (isPlatform) return null;
+
return (
<TopBanner
text={t("org_upgrade_banner_description", { teamName: membership.team.name })}