mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
🐛Fix duplicate billing controls
This commit is contained in:
parent
95feb9f01a
commit
cbe7cafdac
1 changed files with 0 additions and 95 deletions
|
@ -111,101 +111,6 @@ const LegacyBilling = () => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : 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>
|
<Card>
|
||||||
<div className="grid gap-4 p-4 sm:grid-cols-2">
|
<div className="grid gap-4 p-4 sm:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue