Remove unused 'accessToken' props

This commit is contained in:
infinite-persistence 2022-01-19 21:06:14 +08:00 committed by Thomas Zarebczan
parent 89b46265ab
commit fc20f6ab0b
4 changed files with 3 additions and 16 deletions

View file

@ -2,7 +2,7 @@ import { hot } from 'react-hot-loader/root';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { selectGetSyncErrorMessage, selectSyncFatalError, selectSyncIsLocked } from 'redux/selectors/sync'; import { selectGetSyncErrorMessage, selectSyncFatalError, selectSyncIsLocked } from 'redux/selectors/sync';
import { doFetchAccessToken, doUserSetReferrer } from 'redux/actions/user'; import { doFetchAccessToken, doUserSetReferrer } from 'redux/actions/user';
import { selectUser, selectAccessToken, selectUserVerifiedEmail } from 'redux/selectors/user'; import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
import { selectUnclaimedRewards } from 'redux/selectors/rewards'; import { selectUnclaimedRewards } from 'redux/selectors/rewards';
import { doFetchChannelListMine, doFetchCollectionListMine, doResolveUris } from 'redux/actions/claims'; import { doFetchChannelListMine, doFetchCollectionListMine, doResolveUris } from 'redux/actions/claims';
import { selectMyChannelClaimIds } from 'redux/selectors/claims'; import { selectMyChannelClaimIds } from 'redux/selectors/claims';
@ -24,7 +24,6 @@ import App from './view';
const select = (state) => ({ const select = (state) => ({
user: selectUser(state), user: selectUser(state),
accessToken: selectAccessToken(state),
theme: selectThemePath(state), theme: selectThemePath(state),
language: selectLanguage(state), language: selectLanguage(state),
languages: selectLoadedLanguages(state), languages: selectLoadedLanguages(state),

View file

@ -2,18 +2,15 @@ import { connect } from 'react-redux';
import { selectPublishFormValues } from 'redux/selectors/publish'; import { selectPublishFormValues } from 'redux/selectors/publish';
import { doUpdatePublishForm } from 'redux/actions/publish'; import { doUpdatePublishForm } from 'redux/actions/publish';
import PublishAdditionalOptions from './view'; import PublishAdditionalOptions from './view';
import { selectUser, selectAccessToken } from 'redux/selectors/user'; import { selectUser } from 'redux/selectors/user';
import { doFetchAccessToken } from 'redux/actions/user';
const select = (state) => ({ const select = (state) => ({
...selectPublishFormValues(state), ...selectPublishFormValues(state),
accessToken: selectAccessToken(state),
user: selectUser(state), user: selectUser(state),
}); });
const perform = (dispatch) => ({ const perform = (dispatch) => ({
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)), updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
fetchAccessToken: () => dispatch(doFetchAccessToken()),
}); });
export default connect(select, perform)(PublishAdditionalOptions); export default connect(select, perform)(PublishAdditionalOptions);

View file

@ -27,8 +27,6 @@ type Props = {
updatePublishForm: ({}) => void, updatePublishForm: ({}) => void,
useLBRYUploader: boolean, useLBRYUploader: boolean,
needsYTAuth: boolean, needsYTAuth: boolean,
fetchAccessToken: () => void,
accessToken: string,
showSchedulingOptions: boolean, showSchedulingOptions: boolean,
}; };

View file

@ -4,13 +4,7 @@ import { selectGetSyncIsPending, selectSyncHash, selectPrefsReady } from 'redux/
import { doClaimRewardType } from 'redux/actions/rewards'; import { doClaimRewardType } from 'redux/actions/rewards';
import { doSetClientSetting } from 'redux/actions/settings'; import { doSetClientSetting } from 'redux/actions/settings';
import { selectClaimedRewards, makeSelectIsRewardClaimPending } from 'redux/selectors/rewards'; import { selectClaimedRewards, makeSelectIsRewardClaimPending } from 'redux/selectors/rewards';
import { import { selectUserIsPending, selectYoutubeChannels, selectEmailToVerify, selectUser } from 'redux/selectors/user';
selectUserIsPending,
selectYoutubeChannels,
selectEmailToVerify,
selectUser,
selectAccessToken,
} from 'redux/selectors/user';
import { selectMyChannelClaims, selectFetchingMyChannels, selectCreatingChannel } from 'redux/selectors/claims'; import { selectMyChannelClaims, selectFetchingMyChannels, selectCreatingChannel } from 'redux/selectors/claims';
import { selectBalance } from 'redux/selectors/wallet'; import { selectBalance } from 'redux/selectors/wallet';
import * as SETTINGS from 'constants/settings'; import * as SETTINGS from 'constants/settings';
@ -22,7 +16,6 @@ import UserSignIn from './view';
const select = (state) => ({ const select = (state) => ({
emailToVerify: selectEmailToVerify(state), emailToVerify: selectEmailToVerify(state),
user: selectUser(state), user: selectUser(state),
accessToken: selectAccessToken(state),
channels: selectMyChannelClaims(state), channels: selectMyChannelClaims(state),
claimedRewards: selectClaimedRewards(state), claimedRewards: selectClaimedRewards(state),
claimingReward: makeSelectIsRewardClaimPending()(state, { claimingReward: makeSelectIsRewardClaimPending()(state, {