Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
How do i make navbar disappear in some pages
function App() {
  return (
    <BrowserRouter>
      <Navlinks />

      <Routes>
        <Route
          render={({ location }) =>
            location.pathname !== "/" ? <Navlinks /> : true
          }
        />
        <Route path="SignUp" element={<Signup />} />
        <Route path="/" element={<Home></Home>} />
        <Route path="Lorem" element={<Lorem />} />
        <Route path="AboutUs" element={<AboutUs />} />
      </Routes>
    </BrowserRouter>
  );
}

/* <Route index element={<Home funcNav={setShowNav} />} />; */

// props.funcNav(false);

export default App;
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0


you can use to get the path.
import { useLocation } from "react-router-dom";
let location = useLocation();

After that, you just have to check where you want to display it and where you don't.

you can create an array like this.

['path1', 'path2', 'path3'].includes(location.pathname) && ...
about 4 years ago · Juan Pablo Isaza Report

0

You can add an if statement, and use the location path function, if the pathname is "bla" for example, you can print the navbar, or add a div containing the navbar, but with a hidden visibility.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!