Block users with old list
[MAILPOET-2129]
This commit is contained in:
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
||||
|
||||
import InitialQuestion from './step_input_validation/initial_question.jsx';
|
||||
import WrongSourceBlock from './step_input_validation/wrong_source_block.jsx';
|
||||
import OldListBlock from './step_input_validation/old_list_block.jsx';
|
||||
import LastSentQuestion from './step_input_validation/last_sent_question.jsx';
|
||||
|
||||
function StepInputValidation({ stepMethodSelectionData, history }) {
|
||||
@@ -19,6 +20,13 @@ function StepInputValidation({ stepMethodSelectionData, history }) {
|
||||
[stepMethodSelectionData, history],
|
||||
);
|
||||
|
||||
function lastSentSubmit(when) {
|
||||
setLastSent(when);
|
||||
if (when === 'recently') {
|
||||
history.push('step_data_manipulation');
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mailpoet_import_validation_step">
|
||||
{importSource === undefined && (
|
||||
@@ -34,9 +42,13 @@ function StepInputValidation({ stepMethodSelectionData, history }) {
|
||||
|
||||
{importSource === 'existing-list' && lastSent === undefined && (
|
||||
<LastSentQuestion
|
||||
onSubmit={() => {}}
|
||||
onSubmit={lastSentSubmit}
|
||||
/>
|
||||
)}
|
||||
|
||||
{importSource === 'existing-list' && lastSent === 'notRecently' && (
|
||||
<OldListBlock />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
|
||||
function OldListBlock() {
|
||||
return (
|
||||
<div className="mailpoet_import_block">
|
||||
<p>{MailPoet.I18n.t('validationStepBlock1')}</p>
|
||||
<p>{MailPoet.I18n.t('validationStepBlock3')}</p>
|
||||
<p>{MailPoet.I18n.t('validationStepBlock4')}</p>
|
||||
<a
|
||||
href="https://kb.mailpoet.com/article/269-reconfirm-subscribers-to-your-list"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="button button-primary"
|
||||
>
|
||||
{MailPoet.I18n.t('validationStepBlockButton')}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default OldListBlock;
|
Reference in New Issue
Block a user