From 3b408715c745030aed6e720e6f19dc8f2aa511d1 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Tue, 24 Jul 2018 11:40:05 -0700 Subject: Refactor home screen and remove unused files --- ui/app/components/pages/home/home.container.js | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ui/app/components/pages/home/home.container.js (limited to 'ui/app/components/pages/home/home.container.js') diff --git a/ui/app/components/pages/home/home.container.js b/ui/app/components/pages/home/home.container.js new file mode 100644 index 000000000..96a45a69b --- /dev/null +++ b/ui/app/components/pages/home/home.container.js @@ -0,0 +1,34 @@ +import Home from './home.component' +import { compose } from 'recompose' +import { connect } from 'react-redux' +import { withRouter } from 'react-router-dom' + +const mapStateToProps = state => { + const { metamask, appState } = state + const { + unapprovedTxs = {}, + unapprovedMsgCount = 0, + unapprovedPersonalMsgCount = 0, + unapprovedTypedMessagesCount = 0, + noActiveNotices, + lostAccounts, + seedWords, + } = metamask + const { forgottenPassword } = appState + + return { + unapprovedTxs, + unapprovedMsgCount, + unapprovedPersonalMsgCount, + unapprovedTypedMessagesCount, + noActiveNotices, + lostAccounts, + forgottenPassword, + seedWords, + } +} + +export default compose( + withRouter, + connect(mapStateToProps) +)(Home) -- cgit