Open AslalSujath opened 1 year ago
just add md:hidden on nav
just add md:hidden on nav
On which tag be need to add this?
import React, { useState } from "react"; import { AiOutlineClose, AiOutlineMenu } from "react-icons/ai";
const Navbar = () => { const [nav, setNav] = useState(false);
const handleNav = () => { setNav(!nav); };
return (
</div>
); };
export default Navbar; this the correct code to fix this issue
you can keep the default state true, so you don't see the navbar as soon as it opens on a mobile
import React, { useState } from "react"; import { AiOutlineClose, AiOutlineMenu } from "react-icons/ai";
const Navbar = () => { const [nav, setNav] = useState(true);
const handleNav = () => { setNav(!nav); };
When i am open site bar in mobile view then i change view to web the site bar not hidden, so , its shown two menu in one page.