| 12345678910111213141516171819202122 |
- import React from 'react';
- import {Route, Switch} from 'react-router-dom';
- import PokemonShow from './pokemon/show';
- import PokemonIndex from './pokemon/index';
- import NotFound from './not_found';
- function Pokemon({match}) {
- return (
- <>
- <Switch>
- <Route exact path={`${match.path}/:id`} component={PokemonShow} />
- <Route exact path={`${match.path}`} component={PokemonIndex} />
- <Route component={NotFound} />
- </Switch>
- </>
- );
- }
- export default Pokemon;
|