mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
3dbf5dbf65
A lint error was accidentally introduced recently when two PRs changed the same area of code (#9793 and #9795). They didn't conflict, and the lint passed for both, but when combined they left an unused variable.
30 lines
767 B
JavaScript
30 lines
767 B
JavaScript
import React, { PureComponent } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { Redirect } from 'react-router-dom'
|
|
import {
|
|
DEFAULT_ROUTE,
|
|
INITIALIZE_WELCOME_ROUTE,
|
|
INITIALIZE_UNLOCK_ROUTE,
|
|
} from '../../../helpers/constants/routes'
|
|
|
|
export default class FirstTimeFlowSwitch extends PureComponent {
|
|
static propTypes = {
|
|
completedOnboarding: PropTypes.bool,
|
|
isInitialized: PropTypes.bool,
|
|
}
|
|
|
|
render() {
|
|
const { completedOnboarding, isInitialized } = this.props
|
|
|
|
if (completedOnboarding) {
|
|
return <Redirect to={{ pathname: DEFAULT_ROUTE }} />
|
|
}
|
|
|
|
if (!isInitialized) {
|
|
return <Redirect to={{ pathname: INITIALIZE_WELCOME_ROUTE }} />
|
|
}
|
|
|
|
return <Redirect to={{ pathname: INITIALIZE_UNLOCK_ROUTE }} />
|
|
}
|
|
}
|