mirror of
https://github.com/thedevs-network/kutt-extension.git
synced 2026-02-03 13:53:23 +00:00
fix: (#79) enable setSubmitting flag before response dom update
This commit is contained in:
@@ -118,6 +118,9 @@ const PopupForm = withFormik<PopupFormProperties, PopupFormValuesProperties>({
|
||||
apiBody
|
||||
);
|
||||
|
||||
// enable submit button
|
||||
setSubmitting(false);
|
||||
|
||||
if (!response.error) {
|
||||
const {
|
||||
data: { link },
|
||||
@@ -129,9 +132,6 @@ const PopupForm = withFormik<PopupFormProperties, PopupFormValuesProperties>({
|
||||
// errored
|
||||
setRequestProcessed({ error: true, message: response.message });
|
||||
}
|
||||
|
||||
// enable submit button
|
||||
setSubmitting(false);
|
||||
},
|
||||
|
||||
displayName: 'PopupForm',
|
||||
|
||||
Reference in New Issue
Block a user