diff options
author | Alexander Tseung <alextsg@gmail.com> | 2017-12-04 14:24:30 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2017-12-15 06:11:23 +0800 |
commit | dde39e82b5723ba8056b73f0f823d40c3e702a99 (patch) | |
tree | 4143756e6660ac16b896a58dffef612f99770fd5 /ui/app/components/pages/authenticated.js | |
parent | e226b10a89d87af07c7c35ff1251a8264f3bb1b8 (diff) | |
download | tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.gz tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.bz2 tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.lz tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.xz tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.tar.zst tangerine-wallet-browser-dde39e82b5723ba8056b73f0f823d40c3e702a99.zip |
Add routes for mascara
Diffstat (limited to 'ui/app/components/pages/authenticated.js')
-rw-r--r-- | ui/app/components/pages/authenticated.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/app/components/pages/authenticated.js b/ui/app/components/pages/authenticated.js index 78f3a4225..89bd238d2 100644 --- a/ui/app/components/pages/authenticated.js +++ b/ui/app/components/pages/authenticated.js @@ -1,26 +1,26 @@ const { connect } = require('react-redux') const PropTypes = require('prop-types') -const { Redirect, Route } = require('react-router-dom') +const { Redirect } = require('react-router-dom') const h = require('react-hyperscript') -const { UNLOCK_ROUTE, INITIALIZE_MENU_ROUTE } = require('../../routes') +const MetamaskRoute = require('./metamask-route') +const { UNLOCK_ROUTE, INITIALIZE_ROUTE } = require('../../routes') const Authenticated = ({ component: Component, isUnlocked, isInitialized, ...props }) => { - - const render = props => { + const component = renderProps => { switch (true) { case isUnlocked: - return h(Component, { ...props }) + return h(Component, { ...renderProps }) case !isInitialized: - return h(Redirect, { to: { pathname: INITIALIZE_MENU_ROUTE } }) + return h(Redirect, { to: { pathname: INITIALIZE_ROUTE } }) default: return h(Redirect, { to: { pathname: UNLOCK_ROUTE } }) } } return ( - h(Route, { + h(MetamaskRoute, { ...props, - render, + component, }) ) } |