2017-04-24 18:58:48 -05:00
|
|
|
import React from "react";
|
|
|
|
import {browserHistory, Redirect, Route} from "react-router";
|
|
|
|
import {useBasename} from "history";
|
2017-04-26 22:59:51 -05:00
|
|
|
import {App} from "containers";
|
|
|
|
import GenerateWallet from "containers/Tabs/GenerateWallet"
|
|
|
|
import ViewWallet from "containers/Tabs/ViewWallet"
|
|
|
|
|
2017-04-12 00:04:27 -05:00
|
|
|
export const history = getHistory()
|
|
|
|
|
2017-04-24 18:58:48 -05:00
|
|
|
export const Routing = () => (
|
2017-04-12 00:04:27 -05:00
|
|
|
<Route name="App" path='' component={App}>
|
2017-04-26 22:59:51 -05:00
|
|
|
<Route name="GenerateWallet" path="/" component={GenerateWallet}/>
|
|
|
|
<Route name="ViewWallet" path="/view-wallet" component={ViewWallet}/>
|
|
|
|
|
2017-04-12 00:04:27 -05:00
|
|
|
<Redirect from="/*" to="/"/>
|
|
|
|
</Route>
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
function getHistory() {
|
2017-04-26 22:59:51 -05:00
|
|
|
const basename = ''
|
2017-04-12 00:04:27 -05:00
|
|
|
return useBasename(() => browserHistory)({basename})
|
|
|
|
}
|