feat(frontend): remove auth method

This commit is contained in:
sam 2025-02-11 14:21:40 +01:00
parent 373d97e70a
commit c47fc41437
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
8 changed files with 121 additions and 6 deletions

View file

@ -9,9 +9,10 @@ export const setToken = (cookies: Cookies, token: string) =>
cookies.set(TOKEN_COOKIE_NAME, token, { path: "/" });
export const clearToken = (cookies: Cookies) => cookies.delete(TOKEN_COOKIE_NAME, { path: "/" });
// TODO: change this to something we actually clearly have the rights to use
export const DEFAULT_AVATAR = "https://pronouns.cc/default/512.webp";
export const DEFAULT_FLAG = "/unknown_flag.svg";
export const idTimestamp = (id: string) =>
DateTime.fromMillis(parseInt(id, 10) / (1 << 22) + 1_640_995_200_000);
export const alertKey = (url: URL): string | undefined =>
url.searchParams.has("alert") ? "alert." + url.searchParams.get("alert") : undefined;