From 48e0bc28f83fcc8a93cab4a36c249cb52df2bc15 Mon Sep 17 00:00:00 2001 From: Tim Down <158919+timdown@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:05:30 +0000 Subject: [PATCH] Merge pull request #24365 from overleaf/td-bs5-misc-clean-up Remove BS3 code from a couple of places GitOrigin-RevId: 110a8f4c96a5418da27be11471d2e93bb7e01ee8 --- .../dashboard/states/active/add-ons.tsx | 79 ++++++------------- .../preview-subscription-change/root.tsx | 38 ++++----- 2 files changed, 42 insertions(+), 75 deletions(-) diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/add-ons.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/add-ons.tsx index 226ed7862e..c17d52fb91 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/add-ons.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/add-ons.tsx @@ -1,12 +1,6 @@ import { useTranslation } from 'react-i18next' -import { - Dropdown as BS3Dropdown, - MenuItem as BS3MenuItem, -} from 'react-bootstrap' import { Dropdown, DropdownMenu, DropdownToggle } from 'react-bootstrap-5' import OLDropdownMenuItem from '@/features/ui/components/ol/ol-dropdown-menu-item' -import ControlledDropdown from '@/shared/components/controlled-dropdown' -import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' import MaterialIcon from '@/shared/components/material-icon' import { ADD_ON_NAME, @@ -15,8 +9,6 @@ import { AI_STANDALONE_PLAN_CODE, } from '@/features/subscription/data/add-on-codes' import sparkle from '@/shared/svgs/sparkle.svg' -import { bsVersion } from '@/features/utils/bootstrap-5' -import classnames from 'classnames' import { RecurlySubscription } from '../../../../../../../../types/subscription/dashboard/subscription' import { LICENSE_ADD_ON } from '@/features/group-management/components/upgrade-subscription/upgrade-subscription-plan-details' @@ -78,51 +70,28 @@ function AddOn({ {!pendingCancellation && (
- - - - - - handleCancelClick(addOnCode)}> - {t('cancel')} - - - - } - bs5={ - - - - - - handleCancelClick(addOnCode)} - as="button" - tabIndex={-1} - variant="danger" - > - {t('cancel')} - - - - } - /> + + + + + + handleCancelClick(addOnCode)} + as="button" + tabIndex={-1} + variant="danger" + > + {t('cancel')} + + +
)} @@ -146,9 +115,7 @@ function AddOns({ return ( <> -

- {t('add_ons')} -

+

{t('add_ons')}

{addOnsToDisplay && addOnsToDisplay.length > 0 ? ( addOnsToDisplay.map(addOn => ( - +
+ {preview.change.type === 'add-on-purchase' ? ( @@ -100,7 +100,7 @@ function PreviewSubscriptionChange() {

{t('due_today')}:

- + {changeName} @@ -110,10 +110,10 @@ function PreviewSubscriptionChange() { )} - +
{preview.immediateCharge.tax > 0 && ( - + {t('vat')} {preview.nextInvoice.tax.rate * 100}% @@ -123,10 +123,10 @@ function PreviewSubscriptionChange() { preview.currency )} - + )} - + {t('total_today')} @@ -136,7 +136,7 @@ function PreviewSubscriptionChange() { )} - +
@@ -169,7 +169,7 @@ function PreviewSubscriptionChange() {

{t('future_payments')}:

- + {preview.nextInvoice.plan.name} {formatCurrency( @@ -177,10 +177,10 @@ function PreviewSubscriptionChange() { preview.currency )} - + {preview.nextInvoice.addOns.map(addOn => ( - + {addOn.name} {addOn.quantity > 1 ? ` ×${addOn.quantity}` : ''} @@ -188,11 +188,11 @@ function PreviewSubscriptionChange() { {formatCurrency(addOn.amount, preview.currency)} - + ))} {preview.nextInvoice.tax.rate > 0 && ( - + {t('vat')} {preview.nextInvoice.tax.rate * 100}% @@ -202,10 +202,10 @@ function PreviewSubscriptionChange() { preview.currency )} - + )} - + {preview.nextPlan.annual ? t('total_per_year') @@ -214,7 +214,7 @@ function PreviewSubscriptionChange() { {formatCurrency(preview.nextInvoice.total, preview.currency)} - +
@@ -228,8 +228,8 @@ function PreviewSubscriptionChange() {
- - + +
) }