Created
February 18, 2020 00:27
-
-
Save ac205/74bb3f6ebda9fbf6f437f2e4f3cd1ab1 to your computer and use it in GitHub Desktop.
React Router Help
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Router> | |
{/* Admin Panel Routes */} | |
<AdminAppbar /> | |
<AdminMenu /> | |
<Switch> | |
<Route path="/admin/HeroImages" component={HeroImages} /> | |
<Route path="/admin/features" component={Features} /> | |
<Route path="/admin/salebar" component={SaleBar} /> | |
<Route path="/admin/categories" component={Categories} /> | |
<Route path="/admin/products" component={Products} /> | |
<Route path="/admin/add-product" component={AddProduct} /> | |
<Route path="/admin" component={AdminPanel} /> | |
</Switch> | |
{/* Main Site Routes */} | |
<Navbar /> | |
<Menubar /> | |
<MobileMenu /> | |
<Switch> | |
<Route path="/product-details/:name" component={ProductDetail} /> | |
<Route path="/cart" component={Cart} /> | |
<Route path="/contact" component={Contact} /> | |
<Route path="/about" component={About} /> | |
<Route path="/profile" component={Profile} /> | |
<Route path="/shop" component={Shop} /> | |
<Route path="/" component={Home} /> | |
</Switch> | |
<Footer /> | |
</Router> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment