lbry-desktop/ui/component/inviteNew/index.js
2019-11-11 13:27:29 -05:00

25 lines
643 B
JavaScript

import { connect } from 'react-redux';
import {
selectUserInvitesRemaining,
selectUserInviteNewIsPending,
selectUserInviteNewErrorMessage,
selectUserInviteReferralLink,
doUserInviteNew,
} from 'lbryinc';
import InviteNew from './view';
const select = state => ({
errorMessage: selectUserInviteNewErrorMessage(state),
invitesRemaining: selectUserInvitesRemaining(state),
referralLink: selectUserInviteReferralLink(state),
isPending: selectUserInviteNewIsPending(state),
});
const perform = dispatch => ({
inviteNew: email => dispatch(doUserInviteNew(email)),
});
export default connect(
select,
perform
)(InviteNew);