mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Remove error handling for unverified email from PasswordRecoveryPage
This commit is contained in:
parent
4a36f4ac1c
commit
5f27f2b103
6 changed files with 2 additions and 46 deletions
|
|
@ -4,10 +4,7 @@ import { compose } from 'redux';
|
|||
import { connect } from 'react-redux';
|
||||
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
||||
import { propTypes } from '../../util/types';
|
||||
import {
|
||||
isPasswordRecoveryEmailNotFoundError,
|
||||
isPasswordRecoveryEmailNotVerifiedError,
|
||||
} from '../../util/errors';
|
||||
import { isPasswordRecoveryEmailNotFoundError } from '../../util/errors';
|
||||
import { isScrollingDisabled } from '../../ducks/UI.duck';
|
||||
import {
|
||||
Page,
|
||||
|
|
@ -27,7 +24,6 @@ import {
|
|||
retypePasswordRecoveryEmail,
|
||||
clearPasswordRecoveryError,
|
||||
} from './PasswordRecoveryPage.duck';
|
||||
import DoorIcon from './DoorIcon';
|
||||
import css from './PasswordRecoveryPage.css';
|
||||
|
||||
export const PasswordRecoveryPageComponent = props => {
|
||||
|
|
@ -115,25 +111,6 @@ export const PasswordRecoveryPageComponent = props => {
|
|||
</div>
|
||||
);
|
||||
|
||||
const initialEmailText = <span className={css.email}>{initialEmail}</span>;
|
||||
const emailNotVerifiedContent = (
|
||||
<div className={css.emailNotVerifiedContent}>
|
||||
<DoorIcon className={css.modalIcon} />
|
||||
<h1 className={css.modalTitle}>
|
||||
<FormattedMessage id="PasswordRecoveryPage.emailNotVerifiedTitle" />
|
||||
</h1>
|
||||
<p className={css.modalMessage}>
|
||||
<FormattedMessage
|
||||
id="PasswordRecoveryPage.emailNotVerifiedMessage"
|
||||
values={{ initialEmailText }}
|
||||
/>
|
||||
</p>
|
||||
<p className={css.modalMessage}>
|
||||
<FormattedMessage id="PasswordRecoveryPage.emailNotVerifiedContactAdmin" />
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
const genericErrorContent = (
|
||||
<div className={css.genericErrorContent}>
|
||||
<IconKeys className={css.modalIcon} />
|
||||
|
|
@ -147,9 +124,7 @@ export const PasswordRecoveryPageComponent = props => {
|
|||
);
|
||||
|
||||
let content;
|
||||
if (isPasswordRecoveryEmailNotVerifiedError(recoveryError)) {
|
||||
content = emailNotVerifiedContent;
|
||||
} else if (isPasswordRecoveryEmailNotFoundError(recoveryError)) {
|
||||
if (isPasswordRecoveryEmailNotFoundError(recoveryError)) {
|
||||
content = submitEmailContent;
|
||||
} else if (recoveryError) {
|
||||
content = genericErrorContent;
|
||||
|
|
|
|||
|
|
@ -432,9 +432,6 @@
|
|||
"PasswordRecoveryForm.sendInstructions": "Send instructions",
|
||||
"PasswordRecoveryPage.actionFailedMessage": "Something went wrong. Please refresh the page and try again.",
|
||||
"PasswordRecoveryPage.actionFailedTitle": "Whoops!",
|
||||
"PasswordRecoveryPage.emailNotVerifiedContactAdmin": "To resolve the issue, please contact the Saunatime administrators.",
|
||||
"PasswordRecoveryPage.emailNotVerifiedMessage": "Unfortunately, we cannot recover your password because your email address {initialEmailText} hasn't been verified.",
|
||||
"PasswordRecoveryPage.emailNotVerifiedTitle": "We have some bad news",
|
||||
"PasswordRecoveryPage.emailSubmittedMessage": "The instructions for resetting your password have been sent to {submittedEmailText}.",
|
||||
"PasswordRecoveryPage.emailSubmittedTitle": "Check your inbox",
|
||||
"PasswordRecoveryPage.fixEmailInfo": "Whoops, typo in your email? {fixEmailLink}",
|
||||
|
|
|
|||
|
|
@ -432,9 +432,6 @@
|
|||
"PasswordRecoveryForm.sendInstructions": "Enviar instrucciones",
|
||||
"PasswordRecoveryPage.actionFailedMessage": "Algo ha salido mal. Por favor, actualiza la página e inténtalo de nuevo.",
|
||||
"PasswordRecoveryPage.actionFailedTitle": "¡Ups!",
|
||||
"PasswordRecoveryPage.emailNotVerifiedContactAdmin": "Para resolver el problema, contacta al equipo de Saunatime.",
|
||||
"PasswordRecoveryPage.emailNotVerifiedMessage": "Desafortunadamente, no podemos recuperar tu contraseña porque tu dirección de correo electrónico {initialEmailText} no ha sido verificada.",
|
||||
"PasswordRecoveryPage.emailNotVerifiedTitle": "Tenemos malas noticias",
|
||||
"PasswordRecoveryPage.emailSubmittedMessage": "Las instrucciones para restablecer tu contraseña han sido enviadas a {submittedEmailText}.",
|
||||
"PasswordRecoveryPage.emailSubmittedTitle": "Revisa tu buzón",
|
||||
"PasswordRecoveryPage.fixEmailInfo": "Ups, ¿has escrito correctamente tu correo? {fixEmailLink}",
|
||||
|
|
|
|||
|
|
@ -432,9 +432,6 @@
|
|||
"PasswordRecoveryForm.sendInstructions": "Envoyer les instructions",
|
||||
"PasswordRecoveryPage.actionFailedMessage": "Quelque chose s'est mal passé. Veuillez essayer de nouveau.",
|
||||
"PasswordRecoveryPage.actionFailedTitle": "Oups!",
|
||||
"PasswordRecoveryPage.emailNotVerifiedContactAdmin": "Pour résoudre le problème, veuillez contacter l'équipe Saunatime.",
|
||||
"PasswordRecoveryPage.emailNotVerifiedMessage": "Hélas, nous ne pouvons pas réinitialiser votre mot de passe car votre adresse email {initialEmailText} n'a pas été vérifiée.",
|
||||
"PasswordRecoveryPage.emailNotVerifiedTitle": "Mauvaise nouvelle",
|
||||
"PasswordRecoveryPage.emailSubmittedMessage": "Les instructions pour réinitialiser votre mot de passe ont été envoyées à {submittedEmailText}.",
|
||||
"PasswordRecoveryPage.emailSubmittedTitle": "Jetez un œil à votre boîte email",
|
||||
"PasswordRecoveryPage.fixEmailInfo": "Oups, une faute dans votre email ? {fixEmailLink}",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import {
|
|||
ERROR_CODE_CHARGE_ZERO_PAYIN,
|
||||
ERROR_CODE_EMAIL_TAKEN,
|
||||
ERROR_CODE_EMAIL_NOT_FOUND,
|
||||
ERROR_CODE_EMAIL_NOT_VERIFIED,
|
||||
ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS,
|
||||
ERROR_CODE_UPLOAD_OVER_LIMIT,
|
||||
ERROR_CODE_MISSING_STRIPE_ACCOUNT,
|
||||
|
|
@ -81,13 +80,6 @@ export const isUploadImageOverLimitError = error =>
|
|||
export const isPasswordRecoveryEmailNotFoundError = error =>
|
||||
hasErrorWithCode(error, ERROR_CODE_EMAIL_NOT_FOUND);
|
||||
|
||||
/**
|
||||
* Check if the given API error (from `sdk.passwordReset.request()`)
|
||||
* is due to the email not being verified, preventing the reset.
|
||||
*/
|
||||
export const isPasswordRecoveryEmailNotVerifiedError = error =>
|
||||
hasErrorWithCode(error, ERROR_CODE_EMAIL_NOT_VERIFIED);
|
||||
|
||||
/**
|
||||
* Check if the given API error (from `sdk.transaction.initiate()` or
|
||||
* `sdk.transaction.initiateSpeculative()`) is due to the listing
|
||||
|
|
|
|||
|
|
@ -371,7 +371,6 @@ export const ERROR_CODE_CHARGE_ZERO_PAYIN = 'transaction-charge-zero-payin';
|
|||
export const ERROR_CODE_CHARGE_ZERO_PAYOUT = 'transaction-charge-zero-payout';
|
||||
export const ERROR_CODE_EMAIL_TAKEN = 'email-taken';
|
||||
export const ERROR_CODE_EMAIL_NOT_FOUND = 'email-not-found';
|
||||
export const ERROR_CODE_EMAIL_NOT_VERIFIED = 'email-unverified';
|
||||
export const ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS = 'email-too-many-verification-requests';
|
||||
export const ERROR_CODE_UPLOAD_OVER_LIMIT = 'request-upload-over-limit';
|
||||
export const ERROR_CODE_VALIDATION_INVALID_PARAMS = 'validation-invalid-params';
|
||||
|
|
@ -390,7 +389,6 @@ const ERROR_CODES = [
|
|||
ERROR_CODE_CHARGE_ZERO_PAYOUT,
|
||||
ERROR_CODE_EMAIL_TAKEN,
|
||||
ERROR_CODE_EMAIL_NOT_FOUND,
|
||||
ERROR_CODE_EMAIL_NOT_VERIFIED,
|
||||
ERROR_CODE_TOO_MANY_VERIFICATION_REQUESTS,
|
||||
ERROR_CODE_UPLOAD_OVER_LIMIT,
|
||||
ERROR_CODE_VALIDATION_INVALID_PARAMS,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue