diff --git a/apps/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx b/apps/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx index 56a3d6d9ead..d2e7dd4699f 100644 --- a/apps/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx +++ b/apps/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx @@ -216,6 +216,9 @@ export const SmtpForm = () => { ) } + const showFooterMessage = + form.formState.isDirty && ((enableSmtp && !isSmtpEnabled(authConfig)) || !enableSmtp) + return ( @@ -462,26 +465,22 @@ export const SmtpForm = () => { )} - {form.formState.isDirty && ( -

- {enableSmtp ? ( - <> - Rate limit for sending emails will be increased to 30 and{' '} - - can be adjusted - {' '} - after enabling custom SMTP - - ) : ( - 'Rate limit for sending emails will be reduced to 2 after disabling custom SMTP' - )} -

- )} + {showFooterMessage && + (enableSmtp ? ( +

+ Rate limit for sending emails will be increased to 30 and{' '} + + can be adjusted + {' '} + after enabling custom SMTP +

+ ) : ( +

+ Rate limit for sending emails will be reduced to 2 after disabling custom SMTP +

+ ))}
{form.formState.isDirty && (