Elffuss BraidHub

kikocis/continue public

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