aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/first-time-flow/welcome
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pages/first-time-flow/welcome')
-rw-r--r--ui/app/components/pages/first-time-flow/welcome/welcome.component.js12
-rw-r--r--ui/app/components/pages/first-time-flow/welcome/welcome.container.js3
2 files changed, 10 insertions, 5 deletions
diff --git a/ui/app/components/pages/first-time-flow/welcome/welcome.component.js b/ui/app/components/pages/first-time-flow/welcome/welcome.component.js
index 08eb86939..88cdb936c 100644
--- a/ui/app/components/pages/first-time-flow/welcome/welcome.component.js
+++ b/ui/app/components/pages/first-time-flow/welcome/welcome.component.js
@@ -3,12 +3,14 @@ import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Mascot from '../../../mascot'
import Button from '../../../button'
-import { INITIALIZE_SELECT_ACTION_ROUTE, INITIALIZE_UNIQUE_IMAGE_ROUTE } from '../../../../routes'
+import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE } from '../../../../routes'
export default class Welcome extends PureComponent {
static propTypes = {
history: PropTypes.object,
isInitialized: PropTypes.bool,
+ participateInMetaMetrics: PropTypes.bool,
+ welcomeScreenSeen: PropTypes.bool,
}
static contextTypes = {
@@ -22,10 +24,12 @@ export default class Welcome extends PureComponent {
}
componentDidMount () {
- const { history, isInitialized } = this.props
+ const { history, participateInMetaMetrics, welcomeScreenSeen } = this.props
- if (isInitialized) {
- history.push(INITIALIZE_UNIQUE_IMAGE_ROUTE)
+ if (welcomeScreenSeen && participateInMetaMetrics !== null) {
+ history.push(INITIALIZE_CREATE_PASSWORD_ROUTE)
+ } else if (welcomeScreenSeen) {
+ history.push(INITIALIZE_SELECT_ACTION_ROUTE)
}
}
diff --git a/ui/app/components/pages/first-time-flow/welcome/welcome.container.js b/ui/app/components/pages/first-time-flow/welcome/welcome.container.js
index 4362d89cb..47753e16f 100644
--- a/ui/app/components/pages/first-time-flow/welcome/welcome.container.js
+++ b/ui/app/components/pages/first-time-flow/welcome/welcome.container.js
@@ -5,11 +5,12 @@ import { closeWelcomeScreen } from '../../../../actions'
import Welcome from './welcome.component'
const mapStateToProps = ({ metamask }) => {
- const { welcomeScreenSeen, isInitialized } = metamask
+ const { welcomeScreenSeen, isInitialized, participateInMetaMetrics } = metamask
return {
welcomeScreenSeen,
isInitialized,
+ participateInMetaMetrics,
}
}