Answer the question
In order to leave comments, you need to log in
How to remove global header on some react pages?
There is a structure:
render(
(
<ReduxProvider store={store}>
<LangProvider>
<ThemeProvider theme={theme}>
<ReactRouter>
<div>
<Switch>
<Route path="/sign-in" component={SignInPage}/>
<Route path="/sign-up" component={SignUpPage}/>
<Route path="/sign-forgot" component={SignForgotPage}/>
</Switch>
<Header />
<Route exact path="/" component={HomePage}/>
<Route path="/product/:id" component={ProductPage}/>
<Route path="/setting" component={SettingPage} />
<Route path="/orders" component={OrdersPage} />
<Route path="/reviews" component={ReviewsPage} />
<Route path="/shop/:id" component={ShopPage} />
<Route path="/category/:id" component={CategoryPage} />
<Route path="/cart" component={CartPage} />
<Route path="/favorites" component={FavoritesPage} />
<Route path="/categories/:id" component={CategoriesPage} />
<Route path="/article/:id" component={ArticlePage} />
<Footer />
</div>
</ReactRouter>
</ThemeProvider>
</LangProvider>
</ReduxProvider>
),
document.getElementById('root')
);
Answer the question
In order to leave comments, you need to log in
There you need to hide the header and footer.
<Switch>
<Route path="/(sign-in|sign-up|sign-forgot)" component={AuthRoutes} />
<Route component={MainRoutes} />
</Switch>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question