diff options
Diffstat (limited to 'ui/app/components/pages/first-time-flow/notices/notices.container.js')
-rw-r--r-- | ui/app/components/pages/first-time-flow/notices/notices.container.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/app/components/pages/first-time-flow/notices/notices.container.js b/ui/app/components/pages/first-time-flow/notices/notices.container.js new file mode 100644 index 000000000..c65c5b7de --- /dev/null +++ b/ui/app/components/pages/first-time-flow/notices/notices.container.js @@ -0,0 +1,27 @@ +import { connect } from 'react-redux' +import { withRouter } from 'react-router-dom' +import { compose } from 'recompose' +import { markNoticeRead, setCompletedOnboarding } from '../../../../actions' +import Notices from './notices.component' + +const mapStateToProps = ({ metamask }) => { + const { selectedAddress, nextUnreadNotice, noActiveNotices } = metamask + + return { + address: selectedAddress, + nextUnreadNotice, + noActiveNotices, + } +} + +const mapDispatchToProps = dispatch => { + return { + markNoticeRead: notice => dispatch(markNoticeRead(notice)), + completeOnboarding: () => dispatch(setCompletedOnboarding()), + } +} + +export default compose( + withRouter, + connect(mapStateToProps, mapDispatchToProps) +)(Notices) |