busybar-ui / src / core / auth / utils.tsx
utils.tsx
Raw
import { getItem, removeItem, setItem } from '@/core/storage'
import { TokenType } from './types'

const TOKEN = 'token'

export const getToken = () => getItem<TokenType>(TOKEN)
export const removeToken = () => removeItem(TOKEN)
export const setToken = (value: TokenType) => setItem<TokenType>(TOKEN, value)