Remove unused props
This commit is contained in:
parent
428c00901b
commit
36c10a9c78
3 changed files with 1 additions and 16 deletions
|
@ -1,29 +1,22 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
selectUserInvitesRemaining,
|
|
||||||
selectUserInviteNewIsPending,
|
selectUserInviteNewIsPending,
|
||||||
selectUserInviteNewErrorMessage,
|
selectUserInviteNewErrorMessage,
|
||||||
selectUserInviteReferralLink,
|
|
||||||
selectUserInviteReferralCode,
|
selectUserInviteReferralCode,
|
||||||
} from 'redux/selectors/user';
|
} from 'redux/selectors/user';
|
||||||
import { doUserInviteNew } from 'redux/actions/user';
|
import { doUserInviteNew } from 'redux/actions/user';
|
||||||
import { selectMyChannelClaims, selectFetchingMyChannels } from 'redux/selectors/claims';
|
import { selectMyChannelClaims } from 'redux/selectors/claims';
|
||||||
import { doFetchChannelListMine } from 'redux/actions/claims';
|
|
||||||
import InviteNew from './view';
|
import InviteNew from './view';
|
||||||
|
|
||||||
const select = (state) => ({
|
const select = (state) => ({
|
||||||
errorMessage: selectUserInviteNewErrorMessage(state),
|
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||||
invitesRemaining: selectUserInvitesRemaining(state),
|
|
||||||
referralLink: selectUserInviteReferralLink(state),
|
|
||||||
referralCode: selectUserInviteReferralCode(state),
|
referralCode: selectUserInviteReferralCode(state),
|
||||||
isPending: selectUserInviteNewIsPending(state),
|
isPending: selectUserInviteNewIsPending(state),
|
||||||
channels: selectMyChannelClaims(state),
|
channels: selectMyChannelClaims(state),
|
||||||
fetchingChannels: selectFetchingMyChannels(state),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
inviteNew: (email) => dispatch(doUserInviteNew(email)),
|
inviteNew: (email) => dispatch(doUserInviteNew(email)),
|
||||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select, perform)(InviteNew);
|
export default connect(select, perform)(InviteNew);
|
||||||
|
|
|
@ -13,7 +13,6 @@ type Props = {
|
||||||
errorMessage: ?string,
|
errorMessage: ?string,
|
||||||
inviteNew: (string) => void,
|
inviteNew: (string) => void,
|
||||||
isPending: boolean,
|
isPending: boolean,
|
||||||
referralLink: string,
|
|
||||||
referralCode: string,
|
referralCode: string,
|
||||||
channels: ?Array<ChannelClaim>,
|
channels: ?Array<ChannelClaim>,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,23 +1,16 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import SelectChannel from './view';
|
import SelectChannel from './view';
|
||||||
import { selectBalance } from 'redux/selectors/wallet';
|
|
||||||
import { selectMyChannelClaims, selectFetchingMyChannels } from 'redux/selectors/claims';
|
import { selectMyChannelClaims, selectFetchingMyChannels } from 'redux/selectors/claims';
|
||||||
import { doFetchChannelListMine, doCreateChannel } from 'redux/actions/claims';
|
|
||||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
||||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||||
import { doSetActiveChannel } from 'redux/actions/app';
|
import { doSetActiveChannel } from 'redux/actions/app';
|
||||||
|
|
||||||
const select = (state) => ({
|
const select = (state) => ({
|
||||||
myChannelClaims: selectMyChannelClaims(state),
|
myChannelClaims: selectMyChannelClaims(state),
|
||||||
fetchingChannels: selectFetchingMyChannels(state),
|
fetchingChannels: selectFetchingMyChannels(state),
|
||||||
balance: selectBalance(state),
|
|
||||||
emailVerified: selectUserVerifiedEmail(state),
|
|
||||||
activeChannelClaim: selectActiveChannelClaim(state),
|
activeChannelClaim: selectActiveChannelClaim(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
|
|
||||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
|
||||||
setActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
|
setActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue