diff --git a/CHANGELOG.md b/CHANGELOG.md index 00bd560df..ba6ade986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ## [Unreleased] ### Added - - * Add ability to resend verification email ([#1492](https://github.com/lbryio/lbry-app/issues/1492)) * Add Narrative about Feature Request on Help Page and Report Page ([#1551](https://github.com/lbryio/lbry-app/pull/1551)) * Add keyboard shortcut to quit the app on Windows ([#1202](https://github.com/lbryio/lbry-app/pull/1202)) * Build for both architectures (x86 and x64) for Windows ([#1262](https://github.com/lbryio/lbry-app/pull/1262)) diff --git a/src/renderer/component/userEmailVerify/index.js b/src/renderer/component/userEmailVerify/index.js index 886a0318a..f8c854ca1 100644 --- a/src/renderer/component/userEmailVerify/index.js +++ b/src/renderer/component/userEmailVerify/index.js @@ -1,9 +1,6 @@ +import React from 'react'; import { connect } from 'react-redux'; -import { - doUserEmailVerify, - doUserEmailVerifyFailure, - doUserResendVerificationEmail, -} from 'redux/actions/user'; +import { doUserEmailVerify, doUserEmailVerifyFailure } from 'redux/actions/user'; import { selectEmailVerifyIsPending, selectEmailToVerify, @@ -20,7 +17,6 @@ const select = state => ({ const perform = dispatch => ({ verifyUserEmail: (code, recaptcha) => dispatch(doUserEmailVerify(code, recaptcha)), verifyUserEmailFailure: error => dispatch(doUserEmailVerifyFailure(error)), - resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email)), }); export default connect(select, perform)(UserEmailVerify); diff --git a/src/renderer/component/userEmailVerify/view.jsx b/src/renderer/component/userEmailVerify/view.jsx index 9c1ebb8f4..b5f634280 100644 --- a/src/renderer/component/userEmailVerify/view.jsx +++ b/src/renderer/component/userEmailVerify/view.jsx @@ -1,5 +1,5 @@ // @flow -import * as React from 'react'; +import React from 'react'; import Button from 'component/button'; import { Form, FormField, FormRow, Submit } from 'component/common/form'; @@ -10,7 +10,6 @@ type Props = { isPending: boolean, verifyUserEmail: (string, string) => void, verifyUserEmailFailure: string => void, - resendVerificationEmail: string => void, }; type State = { @@ -26,7 +25,6 @@ class UserEmailVerify extends React.PureComponent { }; (this: any).handleSubmit = this.handleSubmit.bind(this); - (this: any).handleResendVerificationEmail = this.handleResendVerificationEmail.bind(this); } handleCodeChanged(event: SyntheticInputEvent<*>) { @@ -45,10 +43,6 @@ class UserEmailVerify extends React.PureComponent { } } - handleResendVerificationEmail() { - this.props.resendVerificationEmail(this.props.email); - } - render() { const { cancelButton, errorMessage, email, isPending } = this.props; @@ -77,11 +71,6 @@ class UserEmailVerify extends React.PureComponent {
{cancelButton} -
); diff --git a/src/renderer/constants/action_types.js b/src/renderer/constants/action_types.js index 4a2d31e0d..3ffe23e6e 100644 --- a/src/renderer/constants/action_types.js +++ b/src/renderer/constants/action_types.js @@ -117,7 +117,6 @@ export const USER_EMAIL_NEW_FAILURE = 'USER_EMAIL_NEW_FAILURE'; export const USER_EMAIL_VERIFY_STARTED = 'USER_EMAIL_VERIFY_STARTED'; export const USER_EMAIL_VERIFY_SUCCESS = 'USER_EMAIL_VERIFY_SUCCESS'; export const USER_EMAIL_VERIFY_FAILURE = 'USER_EMAIL_VERIFY_FAILURE'; -export const USER_EMAIL_VERIFY_RETRY = 'USER_EMAIL_VERIFY_RETRY'; export const USER_PHONE_RESET = 'USER_PHONE_RESET'; export const USER_PHONE_NEW_STARTED = 'USER_PHONE_NEW_STARTED'; export const USER_PHONE_NEW_SUCCESS = 'USER_PHONE_NEW_SUCCESS'; diff --git a/src/renderer/redux/actions/user.js b/src/renderer/redux/actions/user.js index 1893fb13a..8fc5bcb39 100644 --- a/src/renderer/redux/actions/user.js +++ b/src/renderer/redux/actions/user.js @@ -196,38 +196,6 @@ export function doUserEmailNew(email) { }; } -export function doUserResendVerificationEmail(email) { - return dispatch => { - dispatch({ - type: ACTIONS.USER_EMAIL_VERIFY_RETRY, - email, - }); - - const success = () => { - dispatch({ - type: ACTIONS.USER_EMAIL_NEW_SUCCESS, - data: { email }, - }); - dispatch(doUserFetch()); - }; - - const failure = error => { - dispatch({ - type: ACTIONS.USER_EMAIL_NEW_FAILURE, - data: { error }, - }); - }; - - Lbryio.call('user_email', 'resend_token', { email }, 'post') - .catch(error => { - if (error.response && error.response.status === 409) { - throw error; - } - }) - .then(success, failure); - }; -} - export function doUserEmailVerifyFailure(error) { return { type: ACTIONS.USER_EMAIL_VERIFY_FAILURE, diff --git a/src/renderer/scss/component/_content.scss b/src/renderer/scss/component/_content.scss index c409cf161..89359eed1 100644 --- a/src/renderer/scss/component/_content.scss +++ b/src/renderer/scss/component/_content.scss @@ -13,6 +13,10 @@ position: absolute; top: 0; left: 0; + + &:hover { + cursor: pointer; + } } }