aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/ui-migration-annoucement/ui-migration-announcement.container.js
blob: 6dc993b8730d376e4f3f23766cd6965639cb8131 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { connect } from 'react-redux'
import UiMigrationAnnouncement from './ui-migration-annoucement.component'
import { setCompletedUiMigration } from '../../actions'

const mapStateToProps = (state) => {
  const shouldShowAnnouncement = !state.metamask.completedUiMigration

  return {
    shouldShowAnnouncement,
  }
}

const mapDispatchToProps = dispatch => {
  return {
    onClose () {
      dispatch(setCompletedUiMigration())
    },
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(UiMigrationAnnouncement)