mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-13 17:21:48 +02:00
Fix trial showing
This commit is contained in:
@@ -290,7 +290,13 @@ export default function BillingPage() {
|
|||||||
setHasSubscription(
|
setHasSubscription(
|
||||||
tierSub.subscription.status === "active"
|
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
|
// Find license subscription
|
||||||
|
|||||||
Reference in New Issue
Block a user