| 1 | import { getLocalStorage, setLocalStorage } from "./localStorage"; |
| 2 | |
| 3 | export const FREE_TRIAL_LIMIT_REQUESTS = 50; |
| 4 | |
| 5 | export function hasPassedFTL(): boolean { |
| 6 | return (getLocalStorage("ftc") ?? 0) > FREE_TRIAL_LIMIT_REQUESTS; |
| 7 | } |
| 8 | |
| 9 | export function incrementFreeTrialCount(): number { |
| 10 | const u = getLocalStorage("ftc") ?? 0; |
| 11 | setLocalStorage("ftc", u + 1); |
| 12 | return u + 1; |
| 13 | } |