diff --git a/demo/admin/src/common/MasterMenu.tsx b/demo/admin/src/common/MasterMenu.tsx
index 68336553..07776154 100644
--- a/demo/admin/src/common/MasterMenu.tsx
+++ b/demo/admin/src/common/MasterMenu.tsx
@@ -1,5 +1,5 @@
import { Assets, Dashboard, Mail, PageTree, Wrench } from "@comet/admin-icons";
-import { createBrevoContactsPage, createEmailCampaignsPage, createTargetGroupsPage } from "@comet/brevo-admin";
+import { createBrevoContactsPage, createTargetGroupsPage, EmailCampaignsPage } from "@comet/brevo-admin";
import {
AllCategories,
ContentScopeIndicator,
@@ -53,10 +53,6 @@ const getMasterMenuData = ({ brevoContactConfig }: { brevoContactConfig: BrevoCo
input2State: additionalFormConfig.input2State,
});
- const CampaignsPage = createEmailCampaignsPage({
- EmailCampaignContentBlock,
- });
-
return [
{
type: "route",
@@ -95,7 +91,7 @@ const getMasterMenuData = ({ brevoContactConfig }: { brevoContactConfig: BrevoCo
primary: ,
route: {
path: "/newsletter/email-campaigns",
- component: CampaignsPage,
+ component: () => ,
},
},
{
diff --git a/packages/admin/src/emailCampaigns/EmailCampaignsPage.tsx b/packages/admin/src/emailCampaigns/EmailCampaignsPage.tsx
index e09910b3..dbda3f55 100644
--- a/packages/admin/src/emailCampaigns/EmailCampaignsPage.tsx
+++ b/packages/admin/src/emailCampaigns/EmailCampaignsPage.tsx
@@ -10,48 +10,45 @@ import { EmailCampaignForm } from "./form/EmailCampaignForm";
import { EmailCampaignStatistics } from "./statistics/EmailCampaignStatistics";
import { EmailCampaignView } from "./view/EmailCampaignView";
-interface CreateEmailCampaignsPageOptions {
+interface EmailCampaignsPageOptions {
EmailCampaignContentBlock: BlockInterface;
}
-export function createEmailCampaignsPage({ EmailCampaignContentBlock }: CreateEmailCampaignsPageOptions) {
- function EmailCampaignsPage(): JSX.Element {
- const { scopeParts } = useBrevoConfig();
- const { scope: completeScope } = useContentScope();
- const intl = useIntl();
+export function EmailCampaignsPage({ EmailCampaignContentBlock }: EmailCampaignsPageOptions): JSX.Element {
+ const { scopeParts } = useBrevoConfig();
+ const { scope: completeScope } = useContentScope();
+ const intl = useIntl();
- const scope = scopeParts.reduce((acc, scopePart) => {
- acc[scopePart] = completeScope[scopePart];
- return acc;
- }, {} as { [key: string]: unknown });
+ const scope = scopeParts.reduce((acc, scopePart) => {
+ acc[scopePart] = completeScope[scopePart];
+ return acc;
+ }, {} as { [key: string]: unknown });
- return (
-
-
-
- } />
-
-
- {(selectedId) => }
-
- {(selectedId) => }
-
+ return (
+
+
+
+ } />
+
+
+ {(selectedId) => }
+
+ {(selectedId) => }
+
-
- {(selectedId) => }
-
-
-
-
-
-
- );
- }
- return EmailCampaignsPage;
+
+ {(selectedId) => }
+
+
+
+
+
+
+ );
}
diff --git a/packages/admin/src/index.ts b/packages/admin/src/index.ts
index abf8d740..98e9e29c 100644
--- a/packages/admin/src/index.ts
+++ b/packages/admin/src/index.ts
@@ -1,6 +1,6 @@
export { createBrevoContactsPage } from "./brevoContacts/BrevoContactsPage";
export { EditBrevoContactFormValues } from "./brevoContacts/form/BrevoContactForm";
export { BrevoConfig, BrevoConfigProvider, useBrevoConfig } from "./common/BrevoConfigProvider";
-export { createEmailCampaignsPage } from "./emailCampaigns/EmailCampaignsPage";
+export { EmailCampaignsPage } from "./emailCampaigns/EmailCampaignsPage";
export { EditTargetGroupFinalFormValues } from "./targetGroups/TargetGroupForm";
export { createTargetGroupsPage } from "./targetGroups/TargetGroupsPage";