File tree Expand file tree Collapse file tree
server/client/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { Component } from 'react' ;
22import { BrowserRouter , Route } from 'react-router-dom' ;
33
44import Header from './Header' ;
55const Dashboard = ( ) => < h2 > Dashboard</ h2 > ;
66const SurveyNew = ( ) => < h2 > SurveyNew</ h2 > ;
77const Landing = ( ) => < h2 > Landing</ h2 > ;
88
9- const App = ( ) => {
10- return (
11- < div className = "container" >
12- < BrowserRouter >
13- < div >
14- < Header />
15- < Route exact path = "/" component = { Landing } />
16- < Route exact path = "/surveys" component = { Dashboard } />
17- < Route path = "/surveys/new" component = { SurveyNew } />
18- </ div >
19- </ BrowserRouter >
20- </ div >
21- ) ;
22- } ;
9+ class App extends Component {
10+ render ( ) {
11+ return (
12+ < div className = "container" >
13+ < BrowserRouter >
14+ < div >
15+ < Header />
16+ < Route exact path = "/" component = { Landing } />
17+ < Route exact path = "/surveys" component = { Dashboard } />
18+ < Route path = "/surveys/new" component = { SurveyNew } />
19+ </ div >
20+ </ BrowserRouter >
21+ </ div >
22+ ) ;
23+ }
24+ }
2325
2426export default App ;
You can’t perform that action at this time.
0 commit comments