diff --git a/packages/twenty-front/src/modules/billing/components/SubscriptionPrice.tsx b/packages/twenty-front/src/modules/billing/components/SubscriptionPrice.tsx index 206c9b768..c359e8dd6 100644 --- a/packages/twenty-front/src/modules/billing/components/SubscriptionPrice.tsx +++ b/packages/twenty-front/src/modules/billing/components/SubscriptionPrice.tsx @@ -1,4 +1,5 @@ import styled from '@emotion/styled'; +import { useLingui } from '@lingui/react/macro'; import { SubscriptionInterval } from '~/generated-metadata/graphql'; type SubscriptionPriceProps = { @@ -20,10 +21,26 @@ const StyledPriceUnitSpan = styled.span` `; export const SubscriptionPrice = ({ type, price }: SubscriptionPriceProps) => { + const { t } = useLingui(); + const pricePerSeat = + type === SubscriptionInterval.Year ? (price / 12).toFixed(2) : price; + + let priceUnit = ''; + switch (type) { + case SubscriptionInterval.Month: + priceUnit = t`seat / month`; + break; + case SubscriptionInterval.Year: + priceUnit = t`seat / month - billed yearly`; + break; + default: + priceUnit = `seat / ${type.toLocaleLowerCase()}`; + } + return ( <> - {`$${price}`} - {`seat / ${type.toLocaleLowerCase()}`} + {`$${pricePerSeat}`} + {priceUnit} ); };