1 2 3 4 5 6 7
export default () => ( fetch('/api/user/logout', { method: 'POST', }) .then(() => window.location.href = "/") .catch(() => {}) );