2017-12-13 11:01:37 +00:00
|
|
|
import React from 'react';
|
2018-08-10 15:18:22 +00:00
|
|
|
import { hot } from 'react-hot-loader';
|
2018-02-20 09:30:36 +00:00
|
|
|
import { Route, Switch } from 'react-router-dom';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import { ConnectedRouter } from 'react-router-redux';
|
|
|
|
import store, { history } from '../store';
|
|
|
|
|
2018-08-13 12:52:43 +00:00
|
|
|
import ErrorBoundary from '~/js/support/ErrorBoundary';
|
|
|
|
|
2018-04-11 10:06:46 +00:00
|
|
|
import LandingPageContainer from '../components/landing';
|
|
|
|
import WalletContainer from '../components/wallet';
|
2018-05-18 16:26:45 +00:00
|
|
|
import BootloaderContainer from '../components/wallet/pages/Bootloader';
|
2018-05-22 12:16:18 +00:00
|
|
|
import InitializeContainer from '../components/wallet/pages/Initialize';
|
2018-05-18 16:26:45 +00:00
|
|
|
import AcquireContainer from '../components/wallet/pages/Acquire';
|
2018-08-08 12:39:43 +00:00
|
|
|
import UnreadableDeviceContainer from '../components/wallet/pages/UnreadableDevice';
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-05-18 16:26:45 +00:00
|
|
|
import DashboardContainer from '../components/wallet/pages/Dashboard';
|
|
|
|
import SummaryContainer from '../components/wallet/account/summary';
|
|
|
|
import SendFormContainer from '../components/wallet/account/send';
|
|
|
|
import ReceiveContainer from '../components/wallet/account/receive';
|
|
|
|
import SignVerifyContainer from '../components/wallet/account/sign/SignVerify';
|
|
|
|
import DeviceSettingsContainer from '../components/wallet/pages/DeviceSettings';
|
|
|
|
import WalletSettingsContainer from '../components/wallet/pages/WalletSettings';
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-08-10 15:18:22 +00:00
|
|
|
const App = () => (
|
2018-07-30 10:52:13 +00:00
|
|
|
<Provider store={store}>
|
|
|
|
<ConnectedRouter history={history}>
|
2018-02-20 09:30:36 +00:00
|
|
|
<Switch>
|
2018-07-30 10:52:13 +00:00
|
|
|
<Route exact path="/" component={LandingPageContainer} />
|
|
|
|
<Route exact path="/bridge" component={LandingPageContainer} />
|
|
|
|
<Route exact path="/import" component={LandingPageContainer} />
|
2018-02-20 09:30:36 +00:00
|
|
|
<Route>
|
|
|
|
<WalletContainer>
|
2018-08-13 12:52:43 +00:00
|
|
|
<ErrorBoundary>
|
|
|
|
<Route exact path="/settings" component={WalletSettingsContainer} />
|
|
|
|
<Route exact path="/device/:device/" component={DashboardContainer} />
|
|
|
|
<Route exact path="/device/:device/network/:network" component={DashboardContainer} />
|
|
|
|
<Route exact path="/device/:device/acquire" component={AcquireContainer} />
|
|
|
|
<Route exact path="/device/:device/unreadable" component={UnreadableDeviceContainer} />
|
|
|
|
<Route exact path="/device/:device/bootloader" component={BootloaderContainer} />
|
|
|
|
<Route exact path="/device/:device/initialize" component={InitializeContainer} />
|
|
|
|
<Route exact path="/device/:device/settings" component={DeviceSettingsContainer} />
|
|
|
|
<Route exact path="/device/:device/network/:network/account/:account" component={SummaryContainer} />
|
|
|
|
<Route path="/device/:device/network/:network/account/:account/send" component={SendFormContainer} />
|
|
|
|
<Route path="/device/:device/network/:network/account/:account/send/override" component={SendFormContainer} />
|
|
|
|
<Route path="/device/:device/network/:network/account/:account/receive" component={ReceiveContainer} />
|
|
|
|
<Route path="/device/:device/network/:network/account/:account/signverify" component={SignVerifyContainer} />
|
|
|
|
</ErrorBoundary>
|
2018-02-20 09:30:36 +00:00
|
|
|
</WalletContainer>
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</ConnectedRouter>
|
|
|
|
</Provider>
|
2018-08-10 15:18:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export default hot(module)(App);
|