You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
560 B
27 lines
560 B
const { VITE_PROFILES } = process.env; |
|
|
|
export function setStorageItem(name, value) { |
|
window.localStorage.setItem(name, value); |
|
} |
|
|
|
export function getStorageItem(name) { |
|
return window.localStorage.getItem(name);; |
|
} |
|
|
|
export function deleteStorageItem(name) { |
|
window.localStorage.removeItem(name);; |
|
} |
|
|
|
const TOKEN_KEY = "token" |
|
export function setToken(value) { |
|
setStorageItem(TOKEN_KEY, value, 1) |
|
} |
|
|
|
|
|
export function getToken() { |
|
return getStorageItem(TOKEN_KEY); |
|
} |
|
|
|
export function deleteToken() { |
|
return deleteStorageItem(TOKEN_KEY); |
|
} |