aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/authenticated.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pages/authenticated.js')
-rw-r--r--ui/app/components/pages/authenticated.js16
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,
})
)
}