v4.6 -1 (#459)
This commit is contained in:
@@ -11,8 +11,10 @@ export const clearToken = () => {
|
||||
};
|
||||
|
||||
export const setToken = (token: string) => {
|
||||
if (typeof window === 'undefined') return '';
|
||||
localStorage.setItem(tokenKey, token);
|
||||
};
|
||||
export const getToken = () => {
|
||||
if (typeof window === 'undefined') return '';
|
||||
return localStorage.getItem(tokenKey) || '';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user