MyCrypto/common/routing/index.jsx

20 lines
497 B
React
Raw Normal View History

2017-04-24 23:58:48 +00:00
import React from "react";
import {browserHistory, Redirect, Route} from "react-router";
import {useBasename} from "history";
import {App, Tabs} from "containers";
2017-04-12 05:04:27 +00:00
export const history = getHistory()
2017-04-24 23:58:48 +00:00
export const Routing = () => (
2017-04-12 05:04:27 +00:00
<Route name="App" path='' component={App}>
<Route name="Tabs" path="/" component={Tabs}/>
2017-04-12 05:04:27 +00:00
<Redirect from="/*" to="/"/>
</Route>
)
function getHistory() {
2017-04-27 03:13:39 +00:00
const basename = ''
2017-04-12 05:04:27 +00:00
return useBasename(() => browserHistory)({basename})
}