[web] Handle past-due state on clicking "renew"
This commit is contained in:
parent
1020366c3a
commit
ba314eb647
1 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@ import {
|
|||
isOnFreePlan,
|
||||
isSubscriptionActive,
|
||||
isSubscriptionCancelled,
|
||||
isSubscriptionPastDue,
|
||||
} from "utils/billing";
|
||||
|
||||
import { Typography } from "@mui/material";
|
||||
|
@ -54,7 +55,10 @@ export default function SubscriptionStatus({
|
|||
showPlanSelectorModal();
|
||||
}
|
||||
} else {
|
||||
if (hasStripeSubscription(userDetails.subscription)) {
|
||||
if (
|
||||
hasStripeSubscription(userDetails.subscription) &&
|
||||
isSubscriptionPastDue(userDetails.subscription)
|
||||
) {
|
||||
billingService.redirectToCustomerPortal();
|
||||
} else {
|
||||
showPlanSelectorModal();
|
||||
|
|
Loading…
Reference in a new issue