-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
34 lines (32 loc) · 1.19 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import Login from './components/Login';
import Search from './components/Search';
import Album from './components/Album';
import Favorites from './components/Favorites';
import Profile from './components/Profile';
import ProfileEdit from './components/ProfileEdit';
import NotFound from './components/NotFound';
import Loading from './components/Loading';
class App extends React.Component {
render() {
return (
<div>
<h1>TrybeTunes</h1>
<BrowserRouter>
<Switch>
<Route exact path="/" component={ Login } />
<Route exact path="/search" component={ Search } />
<Route exact path="/album/:id" render={ (props) => <Album { ...props } /> } />
<Route exact path="/favorites" component={ Favorites } />
<Route exact path="/profile" component={ Profile } />
<Route exact path="/profile/edit" component={ ProfileEdit } />
<Route exact path="/loading" component={ Loading } />
<Route component={ NotFound } />
</Switch>
</BrowserRouter>
</div>
);
}
}
export default App;