import axios from "axios"; async function readCookie() { try { const res = await axios.get("/readCookie"); console.log('IM CHECKING AUTH') if (res.data === "No Cookie Set") { console.log('I CHECKED AUTH') document.location = "/"; } } catch (e) { console.log(e); } }; export default readCookie;