umami/lib/client.ts

15 lines
322 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);
}
2022-12-28 05:20:44 +01:00
export function setClientAuthToken(token) {
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);
}