Files
calendar/apps/web/modules/settings/platform/new/create-new-view.tsx
T
Lauris SkraucisandGitHub ab1c1bb015 fix: allow only platform organisation or non-platform organisation (#20972)
* fix: platform customers cant subscribe to organizations plan

* fix: organization customers cant subscribe to platform plan
2025-04-30 10:33:01 +02:00

31 lines
999 B
TypeScript

"use client";
import { CreateANewPlatformForm } from "@calcom/features/ee/platform/components/index";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Alert } from "@calcom/ui/components/alert";
import { WizardLayout } from "@calcom/ui/components/layout";
import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes";
export const LayoutWrapper = ({ children }: { children: React.ReactNode }) => {
const { t } = useLocale();
const { isPlatformUser, userOrgId } = useGetUserAttributes();
if (!isPlatformUser && userOrgId) {
return (
<div className="flex h-full min-h-screen items-center justify-center">
<div className="max-w-lg">
<Alert severity="warning" title={t("organization_customer_cant_create_platform")} />
</div>
</div>
);
}
return (
<WizardLayout currentStep={1} maxSteps={1}>
{children}
</WizardLayout>
);
};
export default CreateANewPlatformForm;