lbry-desktop/ui/js/component/drawer/index.jsx

34 lines
624 B
React
Raw Normal View History

2017-04-07 07:15:22 +02:00
import React from 'react'
import {
connect
} from 'react-redux'
import Drawer from './view'
import {
doNavigate,
doCloseDrawer,
doLogoClick,
} from 'actions/app'
2017-04-22 15:17:01 +02:00
import {
doUpdateBalance,
} from 'actions/wallet'
2017-04-07 07:15:22 +02:00
import {
selectCurrentPage,
} from 'selectors/app'
2017-04-22 15:17:01 +02:00
import {
selectBalance,
} from 'selectors/wallet'
2017-04-07 07:15:22 +02:00
const select = (state) => ({
currentPage: selectCurrentPage(state),
balance: selectBalance(state),
})
const perform = {
linkClick: doNavigate,
logoClick: doLogoClick,
closeDrawerClick: doCloseDrawer,
updateBalance: doUpdateBalance,
}
export default connect(select, perform)(Drawer)