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

26 lines
631 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2018-04-18 00:03:01 -04:00
import {
2018-10-26 00:20:18 -04:00
doSendTip,
2018-04-18 00:03:01 -04:00
makeSelectTitleForUri,
makeSelectClaimForUri,
selectIsSendingSupport,
selectBalance,
2018-04-18 00:03:01 -04:00
} from 'lbry-redux';
2018-04-03 19:58:58 -04:00
import WalletSendTip from './view';
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),
balance: selectBalance(state),
2017-09-17 16:33:52 -04:00
});
const perform = dispatch => ({
sendSupport: (amount, claimId, isSupport) => dispatch(doSendTip(amount, claimId, isSupport)),
2017-09-17 16:33:52 -04:00
});
2018-10-26 00:20:18 -04:00
export default connect(
select,
perform
)(WalletSendTip);