I have a problem with read a cookie in my browser.. here's my code
const dataA = authService.isLogin();
useEffect(() => {
if (dataA) {
router.push("/");
}
}, [dataA]); ```
the dataA is get a cookie value from my browser.. but thats not working.. it caused my router.push not redirect to the page
how can i solve it ?