fireclint / data-finance-react-tailwind

131 stars 98 forks source link

NavBar isssu #2

Open AslalSujath opened 1 year ago

AslalSujath commented 1 year ago

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.

Screenshot 2022-10-24 155419 Screenshot 2022-10-24 155455

tabung commented 1 year ago

just add md:hidden on nav

shakti177 commented 11 months ago

just add md:hidden on nav

On which tag be need to add this?

mukand-mapara commented 3 months ago

import React, { useState } from "react"; import { AiOutlineClose, AiOutlineMenu } from "react-icons/ai";

const Navbar = () => { const [nav, setNav] = useState(false);

const handleNav = () => { setNav(!nav); };

return (

react

  • Home
  • Company
  • Resources
  • About
  • Contact
{nav ? : }

react

  • Home
  • Company
  • Resources
  • About
  • Contact
</div>

); };

export default Navbar; this the correct code to fix this issue

HaiderABB commented 4 weeks ago

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); };