File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change
1
+ import React , { Component } from 'react' ;
2
+
3
+ export default class Wrapper extends Component {
4
+ render ( ) {
5
+ return (
6
+ < div >
7
+ { this . props . children }
8
+ </ div >
9
+ ) ;
10
+ }
11
+ }
Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ import App from './components/App';
5
5
import NotFound from './components/NotFound' ;
6
6
import Home from './components/Home' ;
7
7
import About from './components/About' ;
8
+ import Wrapper from './components/Wrapper' ;
8
9
9
10
export const routes = (
10
- < Route path = "/" title = "App" component = { App } >
11
+ < Route path = "/" title = "App" component = { Wrapper } >
11
12
< IndexRoute component = { Home } />
12
- < Route path = "about" title = "App - About" component = { About } />
13
+ < Route path = "/" title = "App" component = { App } >
14
+ < Route path = "about" title = "App - About" component = { About } />
15
+ </ Route >
13
16
< Route path = "*" title = "404: Not Found" component = { NotFound } />
14
17
</ Route >
15
18
) ;
You can’t perform that action at this time.
0 commit comments