Initial conversion to react-basics.

This commit is contained in:
Mike Cao 2022-11-21 22:32:55 -08:00
parent c0a18e13fa
commit 2259ee8d76
10 changed files with 724 additions and 609 deletions

14
lib/client.ts Normal file
View 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);
}