fix: State Inconsistency issue on webhook edit modal (#14544)

This commit is contained in:
Amit Sharma authored and GitHub committed 2024-04-12 14:08:58 +05:30
1 parent c79d0890c0
commit b41b830086
1 file changed
+1
@@ -46,6 +46,7 @@ function Component({ webhookId }: { webhookId: string }) {
const editWebhookMutation = trpc.viewer.webhook.edit.useMutation({
async onSuccess() {
await utils.viewer.webhook.list.invalidate();
await utils.viewer.webhook.get.invalidate({ webhookId });
showToast(t("webhook_updated_successfully"), "success");
router.back();
},