mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-18 01:18:23 +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>
|
||||||
<GridCol>
|
<GridCol>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={!isPAYG && baseProPrice > 0}
|
condition={!isPAYG}
|
||||||
show={
|
show={
|
||||||
<StyledPriceSpan>
|
<StyledPriceSpan>
|
||||||
${baseProPrice.toFixed(2)}
|
${baseProPrice.toFixed(2)}
|
||||||
|
@ -10,6 +10,7 @@ import {
|
|||||||
BILLING_PRO_BASE_PRICE,
|
BILLING_PRO_BASE_PRICE,
|
||||||
BILLING_PRO_DEFAULT_INCLUDED_SEATS,
|
BILLING_PRO_DEFAULT_INCLUDED_SEATS,
|
||||||
} from 'component/admin/billing/BillingDashboard/BillingPlan/BillingPlan';
|
} from 'component/admin/billing/BillingDashboard/BillingPlan/BillingPlan';
|
||||||
|
import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus';
|
||||||
|
|
||||||
const StyledDemoDialog = styled(DemoDialog)(({ theme }) => ({
|
const StyledDemoDialog = styled(DemoDialog)(({ theme }) => ({
|
||||||
'& .MuiDialog-paper': {
|
'& .MuiDialog-paper': {
|
||||||
@ -90,6 +91,12 @@ interface IDemoDialogPlansProps {
|
|||||||
export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
||||||
const { trackEvent } = usePlausibleTracker();
|
const { trackEvent } = usePlausibleTracker();
|
||||||
const isEnterprisePaygEnabled = useUiFlag('enterprise-payg');
|
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 (
|
return (
|
||||||
<StyledDemoDialog open={open} onClose={onClose}>
|
<StyledDemoDialog open={open} onClose={onClose}>
|
||||||
@ -138,7 +145,7 @@ export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<div>
|
<div>
|
||||||
<Typography variant='h6' fontWeight='normal'>
|
<Typography variant='h6' fontWeight='normal'>
|
||||||
${BILLING_PAYG_SEAT_PRICE} per user/month
|
${paygSeatPrice} per user/month
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant='body2'>
|
<Typography variant='body2'>
|
||||||
{BILLING_PAYG_DEFAULT_MINIMUM_SEATS} users
|
{BILLING_PAYG_DEFAULT_MINIMUM_SEATS} users
|
||||||
@ -173,7 +180,7 @@ export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<div>
|
<div>
|
||||||
<Typography variant='h6' fontWeight='normal'>
|
<Typography variant='h6' fontWeight='normal'>
|
||||||
${BILLING_PRO_BASE_PRICE}/month
|
${proBasePrice}/month
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant='body2'>
|
<Typography variant='body2'>
|
||||||
includes {BILLING_PRO_DEFAULT_INCLUDED_SEATS}{' '}
|
includes {BILLING_PRO_DEFAULT_INCLUDED_SEATS}{' '}
|
||||||
|
Loading…
Reference in New Issue
Block a user