pl-fe: cleanup
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
parent
200fc5a5cc
commit
615f2cb0cc
1 changed files with 11 additions and 14 deletions
|
@ -31,20 +31,17 @@ const DraftStatusActionBar: React.FC<IDraftStatusActionBar> = ({ source, status
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
const handleCancelClick = () => {
|
const handleCancelClick = () => {
|
||||||
dispatch((_, getState) => {
|
const deleteModal = settings.deleteModal;
|
||||||
|
if (!deleteModal) {
|
||||||
const deleteModal = settings.deleteModal;
|
dispatch(cancelDraftStatus(source.draft_id));
|
||||||
if (!deleteModal) {
|
} else {
|
||||||
dispatch(cancelDraftStatus(source.draft_id));
|
openModal('CONFIRM', {
|
||||||
} else {
|
heading: intl.formatMessage(messages.deleteHeading),
|
||||||
openModal('CONFIRM', {
|
message: intl.formatMessage(messages.deleteMessage),
|
||||||
heading: intl.formatMessage(messages.deleteHeading),
|
confirm: intl.formatMessage(messages.deleteConfirm),
|
||||||
message: intl.formatMessage(messages.deleteMessage),
|
onConfirm: () => dispatch(cancelDraftStatus(source.draft_id)),
|
||||||
confirm: intl.formatMessage(messages.deleteConfirm),
|
});
|
||||||
onConfirm: () => dispatch(cancelDraftStatus(source.draft_id)),
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEditClick = () => {
|
const handleEditClick = () => {
|
||||||
|
|
Loading…
Reference in a new issue