mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
25 lines
525 B
JavaScript
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)
|