import Cookies from 'js-cookie'

const TokenKey = '__token'

export function getToken() {
  return sessionStorage.getItem(TokenKey) || Cookies.get(TokenKey)
}

export function setToken(token) {
  return  Cookies.set(TokenKey, token)
}

export function removeToken() {
  return sessionStorage.removeItem(TokenKey)
}
