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 => {
|
2018-08-23 04:27:35 +02:00
|
|
|
const { appState: { sidebar: { isOpen }, isMascara } } = state
|
2018-07-30 19:42:09 +02:00
|
|
|
|
|
|
|
return {
|
2018-08-23 04:27:35 +02:00
|
|
|
sidebarOpen: isOpen,
|
2018-07-30 19:42:09 +02:00
|
|
|
isMascara,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
|
|
return {
|
2018-08-23 04:27:35 +02:00
|
|
|
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)
|