File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import { SubscriptionPlanId } from '../../constants.subscription' ;
22import type { Organization } from './account/organization' ;
33import type { Subscription } from './account/subscription' ;
4- import { getSubscriptionPlan , getSubscriptionPlanPriority , isSubscriptionExpired } from './account/subscription' ;
4+ import { getSubscriptionPlan , getSubscriptionPlanPriority , getTimeRemaining } from './account/subscription' ;
55
66export type GKLicenses = Partial < Record < GKLicenseType , GKLicense > > ;
77
@@ -192,10 +192,12 @@ export function getSubscriptionFromCheckIn(
192192 ) ;
193193 }
194194
195+ const remainingTime = getTimeRemaining ( actual . expiresOn ) ;
195196 if (
196197 effective == null ||
197198 ( getSubscriptionPlanPriority ( actual . id ) >= getSubscriptionPlanPriority ( effective . id ) &&
198- ! isSubscriptionExpired ( actual ) )
199+ remainingTime != null &&
200+ remainingTime > 0 )
199201 ) {
200202 effective = { ...actual } ;
201203 }
You can’t perform that action at this time.
0 commit comments