From bb42faf69451477892607132f62acab73a13ab81 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Thu, 14 Dec 2023 17:14:05 +0530 Subject: [PATCH] Removed onBlur error feedback in Newsletter General settings (#19379) Fixes PROD-267 --- .../settings/email/newsletters/NewsletterDetailModal.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 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 23341e7b8a..89de771d5a 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 @@ -22,7 +22,7 @@ const ReplyToEmailField: React.FC<{ errors: ErrorMessages; validate: () => void; clearError: (field: string) => void; -}> = ({newsletter, updateNewsletter, errors, clearError, validate}) => { +}> = ({newsletter, updateNewsletter, errors, clearError}) => { const {settings, config} = useGlobalData(); const [defaultEmailAddress, supportEmailAddress] = getSettingValues(settings, ['default_email_address', 'support_email_address']); const newEmailAddressesFlag = useFeatureFlag('newEmailAddresses'); @@ -66,8 +66,6 @@ const ReplyToEmailField: React.FC<{ } const onBlur = () => { - validate(); - // Update the senderReplyTo to the rendered value again const rendered = renderReplyToEmail(newsletter, config, supportEmailAddress, defaultEmailAddress) || ''; setSenderReplyTo(rendered); @@ -191,7 +189,6 @@ const Sidebar: React.FC<{ placeholder={newsletterAddress || ''} title="Sender email address" value={newsletter.sender_email || ''} - onBlur={validate} onChange={e => updateNewsletter({sender_email: e.target.value})} onKeyDown={() => clearError('sender_email')} /> @@ -218,7 +215,6 @@ const Sidebar: React.FC<{ rightPlaceholder={sendingEmailUsername ? `@${sendingDomain(config)}` : `` } title="Sender email address" value={sendingEmailUsername || ''} - onBlur={validate} onChange={(e) => { const username = e.target.value?.split('@')[0]; const newEmail = username ? `${username}@${sendingDomain(config)}` : ''; @@ -246,7 +242,6 @@ const Sidebar: React.FC<{ placeholder="Weekly Roundup" title="Name" value={newsletter.name || ''} - onBlur={validate} onChange={e => updateNewsletter({name: e.target.value})} onKeyDown={() => clearError('name')} />