2017-05-31 00:53:14 +00:00
|
|
|
import React from 'react';
|
2017-06-26 22:27:55 +00:00
|
|
|
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';
|
|
|
|
import Swap from 'containers/Tabs/Swap';
|
|
|
|
import SendTransaction from 'containers/Tabs/SendTransaction';
|
2017-07-28 00:31:59 +00:00
|
|
|
import Contracts from 'containers/Tabs/Contracts';
|
2017-09-04 00:04:27 +00:00
|
|
|
import ENS from 'containers/Tabs/ENS';
|
2017-04-27 03:59:51 +00:00
|
|
|
|
2017-09-04 00:04:27 +00:00
|
|
|
export const history = getHistory();
|
2017-06-26 22:27:55 +00:00
|
|
|
export const Routing = () =>
|
2017-07-02 05:49:06 +00:00
|
|
|
<Route name="App" path="" component={App}>
|
|
|
|
<Route name="GenerateWallet" path="/" component={GenerateWallet} />
|
|
|
|
<Route name="ViewWallet" path="/view-wallet" component={ViewWallet} />
|
|
|
|
<Route name="Help" path="/help" component={Help} />
|
|
|
|
<Route name="Swap" path="/swap" component={Swap} />
|
|
|
|
<Route name="Send" path="/send-transaction" component={SendTransaction} />
|
2017-07-28 00:31:59 +00:00
|
|
|
<Route name="Contracts" path="/contracts" component={Contracts} />
|
2017-09-04 00:04:27 +00:00
|
|
|
<Route name="ENS" path="/ens" component={ENS} />
|
2017-07-02 05:49:06 +00:00
|
|
|
<Redirect from="/*" to="/" />
|
|
|
|
</Route>;
|
2017-04-12 05:04:27 +00:00
|
|
|
|
|
|
|
function getHistory() {
|
2017-07-02 05:49:06 +00:00
|
|
|
const basename = '';
|
|
|
|
return useBasename(() => browserHistory)({ basename });
|
2017-04-12 05:04:27 +00:00
|
|
|
}
|