aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/menu-bar/menu-bar.container.js
blob: 4c52764028abf66b07c59b13320220017eebb0fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { connect } from 'react-redux'
import { WALLET_VIEW_SIDEBAR } from '../sidebars/sidebar.constants'
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_SIDEBAR,
      }))
    },
    hideSidebar: () => dispatch(hideSidebar()),
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(MenuBar)