overleaf/services/web/frontend/js/features/subscription/util/can-extend-trial.ts

14 lines
395 B
TypeScript
Raw Normal View History

import freeTrialExpiresUnderSevenDays from './free-trial-expires-under-seven-days'
import isMonthlyCollaboratorPlan from './is-monthly-collaborator-plan'
export default function canExtendTrial(
planCode: string,
isGroupPlan?: boolean,
trialEndsAt?: string | null
) {
return (
isMonthlyCollaboratorPlan(planCode, isGroupPlan) &&
freeTrialExpiresUnderSevenDays(trialEndsAt)
)
}