diff --git a/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx b/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx index 4050e7936..5e3d50c42 100644 --- a/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx +++ b/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx @@ -12,7 +12,7 @@ export const PreviewSection = () => { const { subscription, isLoading: isSubscriptionLoading } = useSubscription(); const { data, isLoading } = useGetOrgPlanBillingInfo(currentOrg?._id ?? ""); const createCustomerPortalSession = useCreateCustomerPortalSession(); - + const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp([ "managePlan" ] as const); @@ -35,6 +35,12 @@ export const PreviewSection = () => { return formattedDate; } + + function formatPlanSlug(slug: string) { + return slug + .replace(/(\b[a-z])/g, match => match.toUpperCase()) + .replace(/-/g, " "); + } return (
Current plan
-Starter
++ {formatPlanSlug(subscription.slug)} +