forked from react-bootstrap/react-router-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (31 loc) · 1.08 KB
/
index.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
35
36
37
import React from 'react';
import Grid from 'react-bootstrap/lib/Grid';
import ReactDOM from 'react-dom';
import { hashHistory, IndexRedirect, Route, Router } from 'react-router';
import ButtonVisual from './ButtonVisual';
import Home from './Home';
import ListGroupItemVisual from './ListGroupItemVisual';
import MenuItemVisual from './MenuItemVisual';
import NavItemVisual from './NavItemVisual';
import 'bootstrap/less/bootstrap.less';
const App = ({ children }) => (
<Grid>
<h1>React-Router-Bootstrap Module Visual Test</h1>
{children}
</Grid>
);
const mountNode = document.createElement('div');
document.body.appendChild(mountNode);
ReactDOM.render(
<Router history={hashHistory}>
<Route path="/" component={App}>
<IndexRedirect to="/home" />
<Route path="home" component={Home} />
<Route path="button" component={ButtonVisual} />
<Route path="nav-item" component={NavItemVisual} />
<Route path="menu-item" component={MenuItemVisual} />
<Route path="list-group-item" component={ListGroupItemVisual} />
</Route>
</Router>,
mountNode
);