export const checkIfLoggedIn = async () => { try { const resp = await fetch("/api/user/check", { redirect: 'error', credentials: 'include' }); return resp.ok; } catch { return false; } };