aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/pages/first-time-flow/create-password/unique-image/unique-image.component.js
blob: 590cf03039ba235b829855ea3b46af6faa839560 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Button from '../../../../components/ui/button'
import { INITIALIZE_END_OF_FLOW_ROUTE } from '../../../../helpers/constants/routes'

export default class UniqueImageScreen extends PureComponent {
  static contextTypes = {
    t: PropTypes.func,
    metricsEvent: PropTypes.func,
  }

  static propTypes = {
    history: PropTypes.object,
  }

  render () {
    const { t } = this.context
    const { history } = this.props

    return (
      <div>
        <img
          src="/images/sleuth.svg"
          height={42}
          width={42}
        />
        <div className="first-time-flow__header">
          { t('protectYourKeys') }
        </div>
        <div className="first-time-flow__text-block">
          { t('protectYourKeysMessage1') }
        </div>
        <div className="first-time-flow__text-block">
          { t('protectYourKeysMessage2') }
        </div>
        <Button
          type="primary"
          className="first-time-flow__button"
          onClick={() => {
            this.context.metricsEvent({
              eventOpts: {
                category: 'Onboarding',
                action: 'Agree to Phishing Warning',
                name: 'Agree to Phishing Warning',
              },
            })
            history.push(INITIALIZE_END_OF_FLOW_ROUTE)
          }}
        >
          { t('next') }
        </Button>
      </div>
    )
  }
}