Show note if tracking is disabled

[MAILPOET-3743]
This commit is contained in:
Brezo Cordero
2021-10-18 14:05:25 -05:00
committed by Veljko V
parent e828546fa9
commit 0c72f41b8d
2 changed files with 12 additions and 0 deletions

View File

@@ -4,9 +4,12 @@ import { t } from 'common/functions';
import Radio from 'common/form/radio/radio';
import { useSetting } from 'settings/store/hooks';
import { Label, Inputs } from 'settings/components';
import { GlobalContext } from 'context/index.jsx';
export default function Tracking() {
const [enabled, setEnabled] = useSetting('tracking', 'enabled');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { features } = React.useContext<any>(GlobalContext);
return (
<>
@@ -36,6 +39,14 @@ export default function Tracking() {
/>
<label htmlFor="tracking-disabled">
{t('no')}
{features.isSupported('re-engagement-email') && !enabled && (
<>
<br />
<span className="mailpoet-note">
{t('re-engagementDisabledBecauseTrackingIs')}
</span>
</>
)}
</label>
</Inputs>
</>