lbry-desktop/ui/modal/modalSetReferrer/index.js
jessop acd7baf069 provide for resetting referral set error state
improve reward buttons
show setReferrer errors in modal
2020-01-17 11:23:03 -05:00

20 lines
681 B
JavaScript

import { connect } from 'react-redux';
import { doHideModal } from 'redux/actions/app';
import { doUserSetReferrer, selectSetReferrerError, selectSetReferrerPending, doUserSetReferrerReset } from 'lbryinc';
import ModalSetReferrer from './view';
const select = state => ({
referrerSetPending: selectSetReferrerPending(state),
referrerSetError: selectSetReferrerError(state),
});
const perform = dispatch => ({
closeModal: () => dispatch(doHideModal()),
setReferrer: (referrer, doClaim) => dispatch(doUserSetReferrer(referrer, doClaim)),
resetReferrerError: () => dispatch(doUserSetReferrerReset()),
});
export default connect(
select,
perform
)(ModalSetReferrer);