mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
10 lines
212 B
TypeScript
10 lines
212 B
TypeScript
|
export default function isInFreeTrial(trialEndsAt?: string | null) {
|
||
|
if (!trialEndsAt) return false
|
||
|
|
||
|
const endDate = new Date(trialEndsAt)
|
||
|
|
||
|
if (endDate.getTime() < Date.now()) return false
|
||
|
|
||
|
return true
|
||
|
}
|