mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-09 17:18:31 +00:00
Fix trial showing
This commit is contained in:
parent
f87e136f6b
commit
fc54ad49b5
1 changed files with 7 additions and 1 deletions
|
|
@ -290,7 +290,13 @@ export default function BillingPage() {
|
|||
setHasSubscription(
|
||||
tierSub.subscription.status === "active"
|
||||
);
|
||||
setIsTrial(tierSub.subscription.expiresAt != null);
|
||||
// expiresAt is only meaningful while the trial hasn't
|
||||
// actually run out yet; a stale row with a past
|
||||
// expiresAt should no longer be treated as a live trial
|
||||
const expiresAt = tierSub.subscription.expiresAt;
|
||||
setIsTrial(
|
||||
expiresAt != null && expiresAt * 1000 > Date.now()
|
||||
);
|
||||
}
|
||||
|
||||
// Find license subscription
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue