umami/src/lib/client.ts

15 lines
330 B
TypeScript
Raw Normal View History

2022-11-22 07:32:55 +01:00
import { getItem, setItem, removeItem } from 'next-basics';
import { AUTH_TOKEN } from './constants';
2022-12-28 05:20:44 +01:00
export function getClientAuthToken() {
2022-11-22 07:32:55 +01:00
return getItem(AUTH_TOKEN);
}
2023-11-23 03:03:48 +01:00
export function setClientAuthToken(token: string) {
2022-11-22 07:32:55 +01:00
setItem(AUTH_TOKEN, token);
}
2022-12-28 05:20:44 +01:00
export function removeClientAuthToken() {
2022-11-22 07:32:55 +01:00
removeItem(AUTH_TOKEN);
}