Fix: FloatingActions.

This commit is contained in:
elforjani3
2020-11-24 21:05:51 +02:00
parent 53dd447540
commit ec2d079291
16 changed files with 1147 additions and 504 deletions

View File

@@ -201,11 +201,13 @@ function ReceiptForm({
intent: Intent.SUCCESS,
});
setSubmitting(false);
resetForm();
if (submitPayload.redirect) {
history.push('/receipts');
}
if (submitPayload.resetForm) {
resetForm();
}
};
// Handle the request error.
@@ -243,7 +245,7 @@ function ReceiptForm({
},
[history],
);
return (
<div className={classNames(CLASSES.PAGE_FORM_RECEIPT, CLASSES.PAGE_FORM)}>
<Formik
@@ -264,6 +266,7 @@ function ReceiptForm({
<ReceiptFormFloatingActions
isSubmitting={isSubmitting}
receiptId={receiptId}
receiptPublished={true}
onSubmitClick={handleSubmitClick}
onCancelClick={handleCancelClick}
/>