Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛Fix duplicate billing controls

Luke Vellacbe7cafdac8b
diff --git a/apps/web/src/app/[locale]/(admin)/settings/billing/billing-page.tsx b/apps/web/src/app/[locale]/(admin)/settings/billing/billing-page.tsx
index 1a89a24cc..fa22ab1f8 100644
--- a/apps/web/src/app/[locale]/(admin)/settings/billing/billing-page.tsx
+++ b/apps/web/src/app/[locale]/(admin)/settings/billing/billing-page.tsx
@@ -111,101 +111,6 @@ const LegacyBilling = () => {
}}
/>
) : null}
- <div className="grid gap-4 p-4 sm:grid-cols-2">
- <div>
- <Label>
- <Trans i18nKey="billingStatusState" defaults="Status" />
- </Label>
- <div>
- {(() => {
- switch (status) {
- case "active":
- return (
- <Trans i18nKey="billingStatusActive" defaults="Active" />
- );
- case "paused":
- return (
- <Trans i18nKey="billingStatusPaused" defaults="Paused" />
- );
- case "deleted":
- return (
- <Trans
- i18nKey="billingStatusDeleted"
- defaults="Cancelled"
- />
- );
- }
- })()}
- </div>
- </div>
- <div>
- {status === "deleted" ? (
- <Label>
- <Trans i18nKey="endDate" defaults="End date" />
- </Label>
- ) : (
- <Label>
- <Trans i18nKey="dueDate" defaults="Due date" />
- </Label>
- )}
- <div>{dayjs(endDate).format("LL")}</div>
- </div>
- <div>
- <Label>
- <Trans i18nKey="billingStatusPlan" defaults="Plan" />
- </Label>
- <div>
- <Trans i18nKey="planPro" />
- </div>
- </div>
- <div>
- <Label>
- <Trans i18nKey="billingPeriod" defaults="Period" />
- </Label>
- <div>
- {planId === proPlanIdMonthly ? (
- <Trans i18nKey="billingPeriodMonthly" defaults="Monthly" />
- ) : (
- <Trans i18nKey="billingPeriodYearly" defaults="Yearly" />
- )}
- </div>
- </div>
- </div>
- {status === "active" || status === "paused" ? (
- <div className="flex items-center gap-x-2 border-t bg-gray-50 p-3">
- <Button
- asChild
- onClick={(e) => {
- e.preventDefault();
- window.Paddle.Checkout.open({
- override: userPaymentData.updateUrl,
- });
- }}
- >
- <Link href={userPaymentData.updateUrl}>
- <CreditCardIcon className="h-4 w-4" />
- <Trans
- i18nKey="subscriptionUpdatePayment"
- defaults="Update Payment Details"
- />
- </Link>
- </Button>
- <Button
- asChild
- variant="destructive"
- onClick={(e) => {
- e.preventDefault();
- window.Paddle.Checkout.open({
- override: userPaymentData.cancelUrl,
- });
- }}
- >
- <Link href={userPaymentData.cancelUrl}>
- <Trans i18nKey="subscriptionCancel" defaults="Cancel" />
- </Link>
- </Button>
- </div>
- ) : null}
<Card>
<div className="grid gap-4 p-4 sm:grid-cols-2">
<div>