1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 05:12:18 +01:00
metamask-extension/ui/app/pages/lock/lock.container.js

27 lines
533 B
JavaScript
Raw Normal View History

2020-02-24 23:58:26 +01:00
import { compose } from 'redux'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { lockMetamask } from '../../store/actions'
import Lock from './lock.component'
2020-02-15 21:34:12 +01:00
const mapStateToProps = (state) => {
2020-11-03 00:41:28 +01:00
const {
metamask: { isUnlocked },
} = state
return {
isUnlocked,
}
}
2020-02-15 21:34:12 +01:00
const mapDispatchToProps = (dispatch) => {
return {
lockMetamask: () => dispatch(lockMetamask()),
}
}
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(Lock)