1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 16:18:07 +01:00
metamask-extension/ui/app/pages/lock/lock.container.js
2020-02-24 19:28:26 -03:30

25 lines
525 B
JavaScript

import Lock from './lock.component'
import { compose } from 'redux'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { lockMetamask } from '../../store/actions'
const mapStateToProps = (state) => {
const { metamask: { isUnlocked } } = state
return {
isUnlocked,
}
}
const mapDispatchToProps = (dispatch) => {
return {
lockMetamask: () => dispatch(lockMetamask()),
}
}
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(Lock)