lbry-desktop/ui/component/userSignUp/index.js
Sean Yesmunt 2677cd17d8
new signin/signup (#3960)
* new signin/signup

* cleanup and password reset

* new flow working

* cleanup

* add 'autoComplete' props

* fix prop

* try to call email/confirm before resetting password

* Dont use password reset token for email confirmation.

* add password reset

* password manager improvements

* update lbryinc

* cleanup

* slightly improve close button on sign up page

* moar fixes

* fix password autofil

Co-authored-by: Mark Beamer Jr <markbeamerjr@gmail.com>
2020-04-13 15:16:07 -04:00

52 lines
1.7 KiB
JavaScript

import * as SETTINGS from 'constants/settings';
import { connect } from 'react-redux';
import {
selectEmailToVerify,
selectUser,
selectAccessToken,
makeSelectIsRewardClaimPending,
selectClaimedRewards,
rewards as REWARD_TYPES,
doClaimRewardType,
doUserFetch,
selectUserIsPending,
selectYoutubeChannels,
selectGetSyncIsPending,
selectGetSyncErrorMessage,
selectSyncHash,
} from 'lbryinc';
import { selectMyChannelClaims, selectBalance, selectFetchingMyChannels, selectCreatingChannel } from 'lbry-redux';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import UserSignIn from './view';
const select = state => ({
emailToVerify: selectEmailToVerify(state),
user: selectUser(state),
accessToken: selectAccessToken(state),
channels: selectMyChannelClaims(state),
claimedRewards: selectClaimedRewards(state),
claimingReward: makeSelectIsRewardClaimPending()(state, {
reward_type: REWARD_TYPES.TYPE_CONFIRM_EMAIL,
}),
balance: selectBalance(state),
fetchingChannels: selectFetchingMyChannels(state),
youtubeChannels: selectYoutubeChannels(state),
userFetchPending: selectUserIsPending(state),
syncEnabled: makeSelectClientSetting(SETTINGS.ENABLE_SYNC)(state),
syncingWallet: selectGetSyncIsPending(state),
getSyncError: selectGetSyncErrorMessage(state),
hasSynced: Boolean(selectSyncHash(state)),
creatingChannel: selectCreatingChannel(state),
});
const perform = dispatch => ({
fetchUser: () => dispatch(doUserFetch()),
claimReward: () =>
dispatch(
doClaimRewardType(REWARD_TYPES.TYPE_CONFIRM_EMAIL, {
notifyError: false,
})
),
});
export default connect(select, perform)(UserSignIn);