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>
Adding this router. Will redirect to the same URL without the trailing slash.
<Redirect from="/:url*(/+)" to={pathname.slice(0, -1)} />