| // Safe checks for Next.js SSR environment | |
| export const setToken = (token: string) => { | |
| if (typeof window !== "undefined") { | |
| localStorage.setItem("hf_cron_token", token); | |
| } | |
| }; | |
| export const getToken = (): string | null => { | |
| if (typeof window !== "undefined") { | |
| return localStorage.getItem("hf_cron_token"); | |
| } | |
| return null; | |
| }; | |
| export const removeToken = () => { | |
| if (typeof window !== "undefined") { | |
| localStorage.removeItem("hf_cron_token"); | |
| } | |
| }; | |