From 767fc8c7ea91fc43e4b42e520b75abff20768300 Mon Sep 17 00:00:00 2001 From: apanizo Date: Mon, 12 Nov 2018 16:32:04 +0100 Subject: [PATCH] Adding load safe route to react-router #75 --- src/routes/index.js | 8 +++++++- src/routes/routes.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/routes/index.js b/src/routes/index.js index e02b1dbf..fc2c8be3 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -4,7 +4,7 @@ import Loadable from 'react-loadable' import { Switch, Redirect, Route } from 'react-router-dom' import Loader from '~/components/Loader' import Welcome from './welcome/container' -import { SAFELIST_ADDRESS, OPEN_ADDRESS, SAFE_PARAM_ADDRESS, WELCOME_ADDRESS, SETTINS_ADDRESS, OPENING_ADDRESS } from './routes' +import { SAFELIST_ADDRESS, OPEN_ADDRESS, SAFE_PARAM_ADDRESS, WELCOME_ADDRESS, SETTINS_ADDRESS, OPENING_ADDRESS, LOAD_ADDRESS } from './routes' const Safe = Loadable({ loader: () => import('./safe/container'), @@ -31,6 +31,11 @@ const Opening = Loadable({ loading: Loader, }) +const Load = Loadable({ + loader: () => import('./load/container/Load'), + loading: Loader, +}) + const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}` const SAFE_SETTINGS = `${SAFE_ADDRESS}${SETTINS_ADDRESS}` @@ -45,6 +50,7 @@ const Routes = () => ( + ) diff --git a/src/routes/routes.js b/src/routes/routes.js index ca326218..a3f95255 100644 --- a/src/routes/routes.js +++ b/src/routes/routes.js @@ -4,6 +4,7 @@ import { history } from '~/store' export const SAFE_PARAM_ADDRESS = 'address' export const SAFELIST_ADDRESS = '/safes' export const OPEN_ADDRESS = '/open' +export const LOAD_ADDRESS = '/load' export const WELCOME_ADDRESS = '/welcome' export const SETTINS_ADDRESS = '/settings' export const OPENING_ADDRESS = '/opening'