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