import storage from '@/utils/storages/index.js'

export function setToken (data) {
  storage.set('token', data)
}

export const getToken = () => storage.get('token')

export function removeToken () {
  storage.remove('token')
}
export function setUserInfo (data) {
  storage.set('userInfo', data)
}

export const getUserInfo = () => storage.get('userInfo') || {}

export function removeUserInfo () {
  storage.remove('userInfo')
}
