update: webhooks

This commit is contained in:
anik-ghosh-au7 2022-07-17 13:52:31 +05:30
parent 390846c85f
commit 1c61fcc17a
2 changed files with 3 additions and 5 deletions

View File

@ -279,13 +279,14 @@ const UpdateWebhookModal = ({
[WebhookInputDataFields.HEADERS]: [{ ...initHeadersData }],
});
setValidator({ ...initWebhookValidatorData });
onClose();
fetchWebookData();
return;
}
setLoading(false);
};
useEffect(() => {
if (
isOpen &&
view === UpdateWebhookModalViews.Edit &&
selectedWebhook &&
Object.keys(selectedWebhook || {}).length
@ -318,7 +319,7 @@ const UpdateWebhookModal = ({
});
}
}
}, [view]);
}, [isOpen]);
return (
<>
{view === UpdateWebhookModalViews.ADD ? (

View File

@ -115,9 +115,6 @@ const Webhooks = () => {
const paginationHandler = (value: Record<string, number>) => {
setPaginationProps({ ...paginationProps, ...value });
};
useEffect(() => {
fetchWebookData();
}, []);
useEffect(() => {
fetchWebookData();
}, [paginationProps.page, paginationProps.limit]);