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 &&
},