mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Initial conversion to react-basics.
This commit is contained in:
parent
c0a18e13fa
commit
2259ee8d76
10 changed files with 724 additions and 609 deletions
14
lib/client.ts
Normal file
14
lib/client.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { getItem, setItem, removeItem } from 'next-basics';
|
||||
import { AUTH_TOKEN } from './constants';
|
||||
|
||||
export function getAuthToken() {
|
||||
return getItem(AUTH_TOKEN);
|
||||
}
|
||||
|
||||
export function setAuthToken(token) {
|
||||
setItem(AUTH_TOKEN, token);
|
||||
}
|
||||
|
||||
export function removeAuthToken() {
|
||||
removeItem(AUTH_TOKEN);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue