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

94
Views
GitHub pages creating an issue with ReactRouter

The URL: https://lakgupta.github.io/gocomet-myntra-assignment

As you can see, the name exactly matches the path but there's a "#/" being added at the end of the URL as soon as it loads which is why my page won't render at all, any fixes?

App.js

  <CartProvider>
      <Switch>
        <Route path="/gocomet-myntra-assignment" exact>
          {console.log(cartIsShown)}
          {cartIsShown && <Cart onHide={hideCartHandler}></Cart>},
          <Navbar onClickCart={showCartHandler} onSearch={getSearchTerm} />,
          <Middlebar />,
          <div className="filter-product row">
            {" "}
            <FilterTab></FilterTab>{" "}
            <ProductPage searchTerm={searchedTerm}></ProductPage>{" "}
          </div>
        </Route>
        <Route path="/product/:id">
          {cartIsShown && <Cart onHide={hideCartHandler}></Cart>},
          <ProductDetail onClickCartBtn={showCartHandler}></ProductDetail>
        </Route>
      </Switch>
    </CartProvider>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Adding this router. Will redirect to the same URL without the trailing slash.

<Redirect from="/:url*(/+)" to={pathname.slice(0, -1)} />
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!