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