Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- import { Route, Switch } from "react-router-dom";
- import Items from "../Items/Items";
- import ItemDetail from "../Items/ItemDetail";
- function Main(props) {
- return (
- <main className="container-main">
- <Switch>
- <Route path="/" exact render = {()=><h1>POE app Start page</h1>} />
- <Route path="/items" exact component={Items} />
- <Route
- path="/items/:id"
- exact
- render={({match, location, history})=>{
- return <ItemDetail/>
- }} />
- <Route render = {()=><h1>Page not found</h1>} />
- </Switch>
- </main>
- );
- }
- export default Main;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement