From 8d2b5c5464761ee26dbd0e234d877ac354dbd084 Mon Sep 17 00:00:00 2001 From: CodingOnStar Date: Fri, 10 Oct 2025 10:00:29 +0800 Subject: [PATCH] feat(billing): refactor pricing footer to conditionally display tax information based on category --- web/app/components/billing/pricing/footer.tsx | 15 ++++++++++----- web/app/components/billing/pricing/index.tsx | 11 ++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/web/app/components/billing/pricing/footer.tsx b/web/app/components/billing/pricing/footer.tsx index 67986e5aae..aa92dfe7c4 100644 --- a/web/app/components/billing/pricing/footer.tsx +++ b/web/app/components/billing/pricing/footer.tsx @@ -2,24 +2,29 @@ import React from 'react' import Link from 'next/link' import { useTranslation } from 'react-i18next' import { RiArrowRightUpLine } from '@remixicon/react' +import { type Category, CategoryEnum } from '.' type FooterProps = { pricingPageURL: string + currentCategory: Category } const Footer = ({ pricingPageURL, + currentCategory, }: FooterProps) => { const { t } = useTranslation() return (
-
- {t('billing.plansCommon.taxTip')} - {t('billing.plansCommon.taxTipSecond')} -
- + {currentCategory === CategoryEnum.CLOUD && ( +
+ {t('billing.plansCommon.taxTip')} + {t('billing.plansCommon.taxTipSecond')} +
+ )} + void @@ -25,7 +30,7 @@ const Pricing: FC = ({ const { plan } = useProviderContext() const { isCurrentWorkspaceManager } = useAppContext() const [planRange, setPlanRange] = React.useState(PlanRange.monthly) - const [currentCategory, setCurrentCategory] = useState('cloud') + const [currentCategory, setCurrentCategory] = useState(CategoryEnum.CLOUD) const canPay = isCurrentWorkspaceManager useKeyPress(['esc'], onCancel) @@ -57,7 +62,7 @@ const Pricing: FC = ({ planRange={planRange} canPay={canPay} /> -