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

26 lines
624 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2018-04-18 06:03:01 +02:00
import {
2018-10-26 06:20:18 +02:00
doSendTip,
2018-04-18 06:03:01 +02:00
makeSelectTitleForUri,
makeSelectClaimForUri,
selectIsSendingSupport,
selectBalance,
2018-04-18 06:03:01 +02:00
} from 'lbry-redux';
2018-04-04 01:58:58 +02:00
import WalletSendTip from './view';
2017-09-17 22:33:52 +02:00
const select = (state, props) => ({
isPending: selectIsSendingSupport(state),
title: makeSelectTitleForUri(props.uri)(state),
2018-04-04 01:58:58 +02:00
claim: makeSelectClaimForUri(props.uri)(state),
balance: selectBalance(state),
2017-09-17 22:33:52 +02:00
});
const perform = dispatch => ({
sendSupport: (amount, claimId, isSupport) => dispatch(doSendTip(amount, claimId, isSupport)),
2017-09-17 22:33:52 +02:00
});
2018-10-26 06:20:18 +02:00
export default connect(
select,
perform
)(WalletSendTip);