import { deleteCookie, getCookie, setCookie } from 'cookies-next' const getAuth = () => { let auth = getCookie('auth') if (auth) { return JSON.parse(auth) } return false } const setAuth = (user) => { setCookie('auth', JSON.stringify(user)) return true } const deleteAuth = () => { deleteCookie('auth') return true } export { getAuth, setAuth, deleteAuth }