remove amount from new invite component
This commit is contained in:
parent
6ce77f7a8b
commit
8b895caf15
2 changed files with 8 additions and 18 deletions
|
@ -1,26 +1,17 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import InviteNew from './view';
|
||||
import {
|
||||
selectUserInvitesRemaining,
|
||||
selectUserInviteNewIsPending,
|
||||
selectUserInviteNewErrorMessage,
|
||||
} from 'redux/selectors/user';
|
||||
import rewards from 'rewards';
|
||||
import { makeSelectRewardAmountByType } from 'redux/selectors/rewards';
|
||||
|
||||
import { doUserInviteNew } from 'redux/actions/user';
|
||||
import InviteNew from './view';
|
||||
|
||||
const select = state => {
|
||||
const selectReward = makeSelectRewardAmountByType();
|
||||
|
||||
return {
|
||||
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||
invitesRemaining: selectUserInvitesRemaining(state),
|
||||
isPending: selectUserInviteNewIsPending(state),
|
||||
rewardAmount: selectReward(state, { reward_type: rewards.TYPE_REFERRAL }),
|
||||
};
|
||||
};
|
||||
const select = state => ({
|
||||
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||
invitesRemaining: selectUserInvitesRemaining(state),
|
||||
isPending: selectUserInviteNewIsPending(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
inviteNew: email => dispatch(doUserInviteNew(email)),
|
||||
|
|
|
@ -29,8 +29,7 @@ class FormInviteNew extends React.PureComponent {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { errorMessage, isPending, rewardAmount } = this.props;
|
||||
const label = `${__('Get')} ${rewardAmount} LBC`;
|
||||
const { errorMessage, isPending } = this.props;
|
||||
|
||||
return (
|
||||
<Form onSubmit={this.handleSubmit}>
|
||||
|
@ -49,7 +48,7 @@ class FormInviteNew extends React.PureComponent {
|
|||
/>
|
||||
</FormRow>
|
||||
<div className="card__actions">
|
||||
<Submit label={label} disabled={isPending} />
|
||||
<Submit label="INVITE" disabled={isPending} />
|
||||
</div>
|
||||
</Form>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue