Login and artist search pages
This commit is contained in:
parent
3802bce17d
commit
f4dce4653f
5 changed files with 50 additions and 24 deletions
20
src/components/Router.jsx
Normal file
20
src/components/Router.jsx
Normal file
|
@ -0,0 +1,20 @@
|
|||
import React from 'react'
|
||||
import { Router as ReactRouter, Route, Switch } from 'react-router-dom'
|
||||
import history from '../history.js'
|
||||
import ArtistSearch from '../views/ArtistSearch'
|
||||
import Login from '../views/Login'
|
||||
|
||||
history.listen(() => {
|
||||
window.scrollTo(0, 0)
|
||||
})
|
||||
|
||||
export default function Router() {
|
||||
return (
|
||||
<ReactRouter history={history}>
|
||||
<Switch>
|
||||
<Route exact path="/" render={() => <Login />} />
|
||||
<Route exact path="/artist-search" render={() => <ArtistSearch />} />
|
||||
</Switch>
|
||||
</ReactRouter>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue