2017-05-31 00:53:14 +00:00
|
|
|
import React from 'react';
|
|
|
|
import {browserHistory, Redirect, Route} from 'react-router';
|
|
|
|
import {useBasename} from 'history';
|
|
|
|
import {App} from 'containers';
|
|
|
|
import GenerateWallet from 'containers/Tabs/GenerateWallet'
|
|
|
|
import ViewWallet from 'containers/Tabs/ViewWallet'
|
|
|
|
import Help from 'containers/Tabs/Help'
|
2017-06-12 01:02:39 +00:00
|
|
|
import Swap from 'containers/Tabs/Swap'
|
2017-04-27 03:59:51 +00:00
|
|
|
|
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}>
|
2017-04-27 03:59:51 +00:00
|
|
|
<Route name="GenerateWallet" path="/" component={GenerateWallet}/>
|
|
|
|
<Route name="ViewWallet" path="/view-wallet" component={ViewWallet}/>
|
2017-05-24 02:23:33 +00:00
|
|
|
<Route name="Help" path="/help" component={Help}/>
|
2017-06-12 01:02:39 +00:00
|
|
|
<Route name="Swap" path="/swap" component={Swap}/>
|
2017-04-27 03:59:51 +00:00
|
|
|
|
2017-04-12 05:04:27 +00:00
|
|
|
<Redirect from="/*" to="/"/>
|
|
|
|
</Route>
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
function getHistory() {
|
2017-04-27 03:59:51 +00:00
|
|
|
const basename = ''
|
2017-04-12 05:04:27 +00:00
|
|
|
return useBasename(() => browserHistory)({basename})
|
|
|
|
}
|