Remove unused props

This commit is contained in:
infinite-persistence 2021-12-02 20:36:41 +08:00
parent 428c00901b
commit 36c10a9c78
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
3 changed files with 1 additions and 16 deletions

View file

@ -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);

View file

@ -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>,
}; };

View file

@ -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)),
}); });