Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 235 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"axios": "^0.21.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"styled-components": "^5.3.1",
"web-vitals": "^1.1.2"
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logo from './logo.svg';
import './App.css';
import { goToPokedex } from './Routes/Routes';

function App() {
return (
Expand All @@ -15,6 +16,7 @@ function App() {
target="_blank"
rel="noopener noreferrer"
>

Learn React
</a>
</header>
Expand Down
Empty file added src/Components/header.js
Empty file.
Empty file added src/Components/pokemonsCard.js
Empty file.
20 changes: 20 additions & 0 deletions src/Routes/Router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {BrowserRouter as Router,Switch,Route} from 'react-router-dom'
import React from 'react'

export const Router = () =>{
return(
<Router>
<Switch>
<Route exact path='/home' >
</Route>

<Route exact path='/pokedex' >
</Route>

<Route exact path='/details' >
</Route>

</Switch>
</Router>
)
}
13 changes: 13 additions & 0 deletions src/Routes/Routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import history from 'react-router-dom'

export const goToHome = (history) => {
history.push('/')
}

export const goToPokedex = (history) => {
history.push('/pokedex')
}

export const goToDetails = (history) => {
history.push('/details')
}