Closed Qurbonov closed 6 months ago
What you can do is add the following lines
const [open, setOpen] = useState(false);
useEffect(() => {
const handleResize = () => {
if (window.innerWidth >= 768) {
setOpen(false);
}
};
window.addEventListener('resize', handleResize);
return () => window.removeEventListener('resize', handleResize);
}, []);
Basically on resize we have listener which will make setOpen as false and hence navbar will be hidden
responsive navbar is visibile when normal size ?
I need your help