export function isLoggedIn(): Promise { return fetch('http://localhost:31337/user/authorized', { credentials: 'include', }) .then((res) => { return res.json().then((res_json) => { const is_authorized = res_json.message return Boolean(is_authorized) }) }) .catch(() => { return false }) }