-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathApp.js
More file actions
28 lines (26 loc) · 898 Bytes
/
App.js
File metadata and controls
28 lines (26 loc) · 898 Bytes
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
import './App.css';
import React from 'react';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import HomePage from './components/HomePage';
import Header from './components/Header';
import BeerList from './components/BeerList';
import BeerDetail from './components/BeerDetail';
import RandomBeer from './components/RandomBeer';
import NewBeerForm from './components/NewBeerForm';
function App() {
return (
<Router>
<div>
<Header />
<Routes>
<Route path="/" exact Component={HomePage} />
<Route path="/beers" exact Component={BeerList} />
<Route path="/beers/:id" Component={BeerDetail} />
<Route path="/random-beer" Component={RandomBeer} />
<Route path="/new-beer" Component={NewBeerForm} />
</Routes>
</div>
</Router>
);
}
export default App;