2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2020-04-23 01:18:17 -07:00
|
|
|
import { makeSelectTitleForUri, makeSelectClaimForUri, selectIsSendingSupport, selectBalance } from 'lbry-redux';
|
2018-04-03 19:58:58 -04:00
|
|
|
import WalletSendTip from './view';
|
2020-04-23 01:18:17 -07:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
|
|
|
import { withRouter } from 'react-router';
|
2017-09-17 16:33:52 -04:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
isPending: selectIsSendingSupport(state),
|
|
|
|
title: makeSelectTitleForUri(props.uri)(state),
|
2020-02-12 13:59:48 -05:00
|
|
|
claim: makeSelectClaimForUri(props.uri, false)(state),
|
2018-05-14 12:19:07 -04:00
|
|
|
balance: selectBalance(state),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2020-04-23 01:18:17 -07:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
2020-04-23 01:18:17 -07:00
|
|
|
export default withRouter(connect(select, perform)(WalletSendTip));
|