mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-28 05:12:18 +01:00
27 lines
615 B
JavaScript
27 lines
615 B
JavaScript
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
|
|
|
|
return {
|
|
sidebarOpen: isOpen,
|
|
isMascara,
|
|
}
|
|
}
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
return {
|
|
showSidebar: () => {
|
|
dispatch(showSidebar({
|
|
transitionName: 'sidebar-right',
|
|
type: 'wallet-view',
|
|
}))
|
|
},
|
|
hideSidebar: () => dispatch(hideSidebar()),
|
|
}
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(MenuBar)
|