-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
31 lines (29 loc) · 955 Bytes
/
Copy pathApp.js
File metadata and controls
31 lines (29 loc) · 955 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
29
30
31
import React from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import { Navbar } from './components/Navbar';
import { Home } from './pages/Home';
import { About } from './pages/About';
import { Profile } from './pages/Profile';
import { Alert } from './components/Alert';
import { AlertState } from './context/alert/alertState';
import { GithubState } from './context/github/githubState';
function App() {
return (
<GithubState>
<AlertState>
<BrowserRouter>
<Navbar />
<div className='container pt-4'>
<Alert alert={{ text: 'Test alert' }} />
<Switch>
<Route path='/' exact component={Home} />
<Route path='/about' component={About} />
<Route path='/profile/:name' component={Profile} />
</Switch>
</div>
</BrowserRouter>
</AlertState>
</GithubState>
);
}
export default App;