Closed znadir closed 1 year ago
Hi @nadirzebiri I fixed it in my local by setting default openNav state to false
setting its default to false to avoid seeing nav on page load on < 1200 screens
then updating useEffect to
useEffect(() => {
if (screen.width > 1199) {
setOpenNav(true);
}
}, []);
screen.width > 1199 means it will show the nav on page load on >= 1200 screens
Hope this helps :)
Thanks for the solution. However, i think using window.innerWidth
is better approach than screen.width
. I'll keep this issue open until it's resolved in the repository.
Thank you @nadirzebiri @ralphdelara, the issue was the useEffect implementation. It should work as expected now.
Reproduction steps:
Expected behavior:
Actual behavior: