Hide tab behind the feature flag

[MAILPOET-3763]
This commit is contained in:
Pavel Dohnal
2021-09-14 09:28:57 +02:00
committed by Veljko V
parent ac3625e434
commit 377910a2c2

View File

@@ -45,6 +45,7 @@ const trackTabSwitch = (tabKey) => MailPoet.trackEvent(
const Tabs = withNpsPoll(() => { const Tabs = withNpsPoll(() => {
const { parentId } = useParams(); const { parentId } = useParams();
const { features } = React.useContext(GlobalContext);
return ( return (
<> <>
<ListingHeadingDisplay> <ListingHeadingDisplay>
@@ -85,6 +86,7 @@ const Tabs = withNpsPoll(() => {
: <NewsletterListNotification /> : <NewsletterListNotification />
} }
</Tab> </Tab>
{(features.isSupported('re-engagement-email')) && (
<Tab <Tab
key="re_engagement" key="re_engagement"
route="re_engagement/(.*)?" route="re_engagement/(.*)?"
@@ -93,6 +95,7 @@ const Tabs = withNpsPoll(() => {
> >
<NewsletterListReEngagement /> <NewsletterListReEngagement />
</Tab> </Tab>
)}
{window.mailpoet_woocommerce_active && _.map(automaticEmails, (email) => ( {window.mailpoet_woocommerce_active && _.map(automaticEmails, (email) => (
<Tab <Tab
key={email.slug} key={email.slug}