Enterprise plans should not have the upgrade button (#7628)

* Enterprise plans should not have the upgrade button
Fixes #7627

* Move the check to BillingDialog

* Hide home box and change bool check

* Add component tests

* Clean up
This commit is contained in:
Pierre Jacquier
2025-06-28 12:03:41 -04:00
committed by GitHub
parent 7ec11d23c8
commit af658c909d
3 changed files with 130 additions and 62 deletions

View File

@ -6,7 +6,7 @@ import {
BillingRemainingMode,
} from '@src/components/BillingRemaining'
import type { BillingActor } from '@src/machines/billingMachine'
import { type BillingActor } from '@src/machines/billingMachine'
export const BillingDialog = (props: { billingActor: BillingActor }) => {
const billingContext = useSelector(
@ -39,15 +39,18 @@ export const BillingDialog = (props: { billingActor: BillingActor }) => {
mode={BillingRemainingMode.ProgressBarStretch}
billingActor={props.billingActor}
/>
<a
className="bg-ml-black text-ml-white rounded-lg text-center p-1 cursor-pointer"
href="https://zoo.dev/design-studio-pricing"
target="_blank"
rel="noopener noreferrer"
onClick={openExternalBrowserIfDesktop()}
>
Upgrade
</a>
{!hasUnlimited && (
<a
className="bg-ml-black text-ml-white rounded-lg text-center p-1 cursor-pointer"
href="https://zoo.dev/design-studio-pricing"
target="_blank"
rel="noopener noreferrer"
data-testid="billing-upgrade-button"
onClick={openExternalBrowserIfDesktop()}
>
Upgrade
</a>
)}
</div>
</div>
)