aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/higher-order-components/authenticated/authenticated.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/higher-order-components/authenticated/authenticated.component.js')
-rw-r--r--ui/app/higher-order-components/authenticated/authenticated.component.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/ui/app/higher-order-components/authenticated/authenticated.component.js b/ui/app/higher-order-components/authenticated/authenticated.component.js
deleted file mode 100644
index 7b64d4895..000000000
--- a/ui/app/higher-order-components/authenticated/authenticated.component.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import { Redirect, Route } from 'react-router-dom'
-import { UNLOCK_ROUTE, INITIALIZE_ROUTE } from '../../routes'
-
-export default function Authenticated (props) {
- const { isUnlocked, completedOnboarding } = props
-
- switch (true) {
- case isUnlocked && completedOnboarding:
- return <Route { ...props } />
- case !completedOnboarding:
- return <Redirect to={{ pathname: INITIALIZE_ROUTE }} />
- default:
- return <Redirect to={{ pathname: UNLOCK_ROUTE }} />
- }
-}
-
-Authenticated.propTypes = {
- isUnlocked: PropTypes.bool,
- completedOnboarding: PropTypes.bool,
-}