From f05ba155b8b14ac2091c75d0d8551c0efbc3648e Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Thu, 18 Jul 2024 19:25:49 +0530 Subject: [PATCH] Revert fixed publishing issue when site has no active newsletters --- .../settings/email/newsletters/NewsletterDetailModal.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx index 0b73777146..a762d5a707 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterDetailModal.tsx @@ -106,15 +106,8 @@ const Sidebar: React.FC<{ const {localSettings} = useSettingGroup(); const [siteTitle] = getSettingValues(localSettings, ['title']) as string[]; const handleError = useHandleError(); - const {data: {newsletters: apiNewsletters} = {}} = useBrowseNewsletters(); let newsletterAddress = renderSenderEmail(newsletter, config, defaultEmailAddress); - const [newsletters, setNewsletters] = useState(apiNewsletters || []); - const activeNewsletters = newsletters.filter(n => n.status === 'active'); - - useEffect(() => { - setNewsletters(apiNewsletters || []); - }, [apiNewsletters]); const fontOptions: SelectOption[] = [ {value: 'serif', label: 'Elegant serif', className: 'font-serif'}, @@ -259,7 +252,7 @@ const Sidebar: React.FC<{ />
- {newsletter.status === 'active' ? (!onlyOne &&
},