Show loader on cancel
[MAILPOET-2693]
This commit is contained in:
committed by
Veljko V
parent
2503e3bae7
commit
cd73faaff7
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
import MailPoet from 'mailpoet';
|
||||
import { t } from 'common/functions';
|
||||
import { useAction } from 'settings/store/hooks';
|
||||
|
||||
@@ -14,8 +15,10 @@ export default function ActivateOrCancel() {
|
||||
};
|
||||
const cancel = async (e) => {
|
||||
e.preventDefault();
|
||||
MailPoet.Modal.loading(true);
|
||||
await loadSettings();
|
||||
history.push('/mta');
|
||||
MailPoet.Modal.loading(false);
|
||||
};
|
||||
return (
|
||||
<p>
|
||||
|
@@ -206,6 +206,9 @@ export function* reinstall() {
|
||||
}
|
||||
|
||||
export function* sendTestEmail(recipient: string, mailer: Settings['mta']) {
|
||||
if (!recipient) {
|
||||
return { type: 'TEST_EMAIL_FAILED', error: [t('cantSendEmail')] };
|
||||
}
|
||||
yield { type: 'START_TEST_EMAIL_SENDING' };
|
||||
const res = yield {
|
||||
type: 'CALL_API',
|
||||
|
Reference in New Issue
Block a user