Adding load safe route to react-router #75
This commit is contained in:
parent
ff025ecfe6
commit
767fc8c7ea
|
@ -4,7 +4,7 @@ import Loadable from 'react-loadable'
|
||||||
import { Switch, Redirect, Route } from 'react-router-dom'
|
import { Switch, Redirect, Route } from 'react-router-dom'
|
||||||
import Loader from '~/components/Loader'
|
import Loader from '~/components/Loader'
|
||||||
import Welcome from './welcome/container'
|
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({
|
const Safe = Loadable({
|
||||||
loader: () => import('./safe/container'),
|
loader: () => import('./safe/container'),
|
||||||
|
@ -31,6 +31,11 @@ const Opening = Loadable({
|
||||||
loading: Loader,
|
loading: Loader,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const Load = Loadable({
|
||||||
|
loader: () => import('./load/container/Load'),
|
||||||
|
loading: Loader,
|
||||||
|
})
|
||||||
|
|
||||||
const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}`
|
const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}`
|
||||||
const SAFE_SETTINGS = `${SAFE_ADDRESS}${SETTINS_ADDRESS}`
|
const SAFE_SETTINGS = `${SAFE_ADDRESS}${SETTINS_ADDRESS}`
|
||||||
|
|
||||||
|
@ -45,6 +50,7 @@ const Routes = () => (
|
||||||
<Route exact path={SAFE_ADDRESS} component={Safe} />
|
<Route exact path={SAFE_ADDRESS} component={Safe} />
|
||||||
<Route exact path={SAFE_SETTINGS} component={Settings} />
|
<Route exact path={SAFE_SETTINGS} component={Settings} />
|
||||||
<Route exact path={OPENING_ADDRESS} component={Opening} />
|
<Route exact path={OPENING_ADDRESS} component={Opening} />
|
||||||
|
<Route exact path={LOAD_ADDRESS} component={Load} />
|
||||||
</Switch>
|
</Switch>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { history } from '~/store'
|
||||||
export const SAFE_PARAM_ADDRESS = 'address'
|
export const SAFE_PARAM_ADDRESS = 'address'
|
||||||
export const SAFELIST_ADDRESS = '/safes'
|
export const SAFELIST_ADDRESS = '/safes'
|
||||||
export const OPEN_ADDRESS = '/open'
|
export const OPEN_ADDRESS = '/open'
|
||||||
|
export const LOAD_ADDRESS = '/load'
|
||||||
export const WELCOME_ADDRESS = '/welcome'
|
export const WELCOME_ADDRESS = '/welcome'
|
||||||
export const SETTINS_ADDRESS = '/settings'
|
export const SETTINS_ADDRESS = '/settings'
|
||||||
export const OPENING_ADDRESS = '/opening'
|
export const OPENING_ADDRESS = '/opening'
|
||||||
|
|
Loading…
Reference in New Issue