lbry-desktop/ui/js/component/header/index.js

26 lines
522 B
JavaScript
Raw Normal View History

2017-04-22 15:17:01 +02:00
import React from 'react'
2017-05-05 19:05:33 +02:00
import lbry from 'lbry'
2017-04-22 15:17:01 +02:00
import {
connect
} from 'react-redux'
import {
2017-05-04 05:44:08 +02:00
selectBalance
} from 'selectors/wallet'
2017-04-22 15:17:01 +02:00
import {
doNavigate,
2017-05-04 05:44:08 +02:00
doHistoryBack,
2017-04-22 15:17:01 +02:00
} from 'actions/app'
import Header from './view'
const select = (state) => ({
balance: lbry.formatCredits(selectBalance(state), 1),
publish: __("Publish"),
2017-04-22 15:17:01 +02:00
})
const perform = (dispatch) => ({
navigate: (path) => dispatch(doNavigate(path)),
2017-05-04 05:44:08 +02:00
back: () => dispatch(doHistoryBack()),
2017-04-22 15:17:01 +02:00
})
export default connect(select, perform)(Header)