Skip to content

Commit

Permalink
fix(dashboard): enterprise tier environments management
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Jan 23, 2025
1 parent 88635d4 commit 6fea706
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/dashboard/src/components/create-environment-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ export const CreateEnvironmentButton = (props: CreateEnvironmentButtonProps) =>
const navigate = useNavigate();
const track = useTelemetry();

const isBusinessTier = subscription?.apiServiceLevel === ApiServiceLevelEnum.BUSINESS;
const isPaidTier =
subscription?.apiServiceLevel === ApiServiceLevelEnum.BUSINESS ||
subscription?.apiServiceLevel === ApiServiceLevelEnum.ENTERPRISE;
const isTrialActive = subscription?.trial?.isActive;
const canCreateEnvironment = isBusinessTier && !isTrialActive;
const canCreateEnvironment = isPaidTier && !isTrialActive;

const form = useForm<CreateEnvironmentFormData>({
resolver: zodResolver(createEnvironmentSchema),
Expand Down

0 comments on commit 6fea706

Please sign in to comment.