import React , { useState, useEffect } from 'react' import { useLocation } from 'react-router-dom' import { HashLink as Link } from 'react-router-hash-link'; import logo from "../../assets/images/logo_white.png"; import logo1 from "../../assets/images/logo.png"; const Main = ({navbar}) => { const location = useLocation() const path = location.pathname const [show, setShow] = useState() const [show1, setShow1] = useState() const [show2, setShow2] = useState() const [mobile, setmobile] = useState() useEffect(() => { window.scroll(0, 0) }, [path]); return ( <> {path === "/" ? <> {navbar.n2 &&
} : <> {navbar.n2 &&
} } {navbar.n3 &&
} {navbar.n4 &&
} {navbar.n5 &&
} {navbar.n6 &&
} ) } export default Main