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

19 lines
510 B
JavaScript
Raw Normal View History

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