mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-10 01:16:39 +02:00
chore: use instance status prices in demo dialog plans
This commit is contained in:
parent
c61f0a3dfe
commit
cbf5cd841c
@ -130,7 +130,7 @@ export const BillingPlan = () => {
|
||||
</GridCol>
|
||||
<GridCol>
|
||||
<ConditionallyRender
|
||||
condition={!isPAYG && baseProPrice > 0}
|
||||
condition={!isPAYG}
|
||||
show={
|
||||
<StyledPriceSpan>
|
||||
${baseProPrice.toFixed(2)}
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
BILLING_PRO_BASE_PRICE,
|
||||
BILLING_PRO_DEFAULT_INCLUDED_SEATS,
|
||||
} from 'component/admin/billing/BillingDashboard/BillingPlan/BillingPlan';
|
||||
import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus';
|
||||
|
||||
const StyledDemoDialog = styled(DemoDialog)(({ theme }) => ({
|
||||
'& .MuiDialog-paper': {
|
||||
@ -90,6 +91,12 @@ interface IDemoDialogPlansProps {
|
||||
export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
||||
const { trackEvent } = usePlausibleTracker();
|
||||
const isEnterprisePaygEnabled = useUiFlag('enterprise-payg');
|
||||
const { instanceStatus } = useInstanceStatus();
|
||||
|
||||
const paygSeatPrice =
|
||||
instanceStatus?.prices?.payg?.seat ?? BILLING_PAYG_SEAT_PRICE;
|
||||
const proBasePrice =
|
||||
instanceStatus?.prices?.pro?.base ?? BILLING_PRO_BASE_PRICE;
|
||||
|
||||
return (
|
||||
<StyledDemoDialog open={open} onClose={onClose}>
|
||||
@ -138,7 +145,7 @@ export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
||||
</Typography>
|
||||
<div>
|
||||
<Typography variant='h6' fontWeight='normal'>
|
||||
${BILLING_PAYG_SEAT_PRICE} per user/month
|
||||
${paygSeatPrice} per user/month
|
||||
</Typography>
|
||||
<Typography variant='body2'>
|
||||
{BILLING_PAYG_DEFAULT_MINIMUM_SEATS} users
|
||||
@ -173,7 +180,7 @@ export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
||||
</Typography>
|
||||
<div>
|
||||
<Typography variant='h6' fontWeight='normal'>
|
||||
${BILLING_PRO_BASE_PRICE}/month
|
||||
${proBasePrice}/month
|
||||
</Typography>
|
||||
<Typography variant='body2'>
|
||||
includes {BILLING_PRO_DEFAULT_INCLUDED_SEATS}{' '}
|
||||
|
Loading…
Reference in New Issue
Block a user