Answer the question
In order to leave comments, you need to log in
How to remove the footer on one of the pages?
Hello comrades.
there is such a piece of code in my App.jsx
<Fragment>
<Header />
<Container>
<Switch>
<Route exact path="/" component={Menu} />
<Route path="/catalog/:id" component={Catalog} />
<Route path="/delivery" component={Delivery} />
<Route path="/pay" component={Pay} />
<Route path="/about" component={About} />
<Route path="/basket" component={Basket} />
<Route component={NotFound} />
</Switch>
</Container>
<Footer />
<ScrollReset />
</Fragment>
Answer the question
In order to leave comments, you need to log in
Conditional rendering .
Wrap the App in withRouter:
Add a condition:
Display footer by condition:{shouldShowFooter && <Footer />}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question