1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 11:46:13 +02:00
metamask-extension/ui/app/components/menu-bar/menu-bar.container.js

27 lines
615 B
JavaScript
Raw Normal View History

2018-07-30 19:42:09 +02:00
import { connect } from 'react-redux'
import MenuBar from './menu-bar.component'
import { showSidebar, hideSidebar } from '../../actions'
const mapStateToProps = state => {
const { appState: { sidebar: { isOpen }, isMascara } } = state
2018-07-30 19:42:09 +02:00
return {
sidebarOpen: isOpen,
2018-07-30 19:42:09 +02:00
isMascara,
}
}
const mapDispatchToProps = dispatch => {
return {
showSidebar: () => {
dispatch(showSidebar({
transitionName: 'sidebar-right',
type: 'wallet-view',
}))
},
2018-07-30 19:42:09 +02:00
hideSidebar: () => dispatch(hideSidebar()),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(MenuBar)