Display the note correctly

[MAILPOET-3763]
This commit is contained in:
Pavel Dohnal
2021-09-13 12:46:57 +02:00
committed by Veljko V
parent d8b006db1a
commit 05400ec646
3 changed files with 27 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
import React from 'react';
import ReactStringReplace from 'react-string-replace';
import MailPoet from 'mailpoet';
import Heading from 'common/typography/heading/heading';
import Input from 'common/form/input/input';
@@ -46,7 +48,26 @@ export function Scheduling({
</Grid.CenteredRow>
{
(inactiveSubscribersPeriod <= daysSelected) && (
<div>note</div>
<p className="mailpoet-re-engagement-scheduling-note">
{
ReactStringReplace(
MailPoet.I18n.t('reEngagementEmailWarning')
.replace('{$months}', inactiveSubscribersPeriod / 30),
/\[link\](.*?)\[\/link\]/g,
(match) => (
<a
key="link"
href="https://kb.mailpoet.com/article/264-inactive-subscribers"
target="_blank"
rel="noopener noreferrer"
data-beacon-article="5cbf19622c7d3a026fd3efe1"
>
{match}
</a>
)
)
}
</p>
)
}
</>