From 9212f9e270927fad4d6c1cacf43dac14ea975804 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 3 Jun 2022 16:27:08 +0800 Subject: [PATCH] Update toast --- packages/web/pages/settings/webhooks.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web/pages/settings/webhooks.tsx b/packages/web/pages/settings/webhooks.tsx index 324aefd5c..39bbbb850 100644 --- a/packages/web/pages/settings/webhooks.tsx +++ b/packages/web/pages/settings/webhooks.tsx @@ -58,17 +58,17 @@ export default function Webhooks(): JSX.Element { async function onDelete(id: string): Promise { const result = await deleteWebhookMutation(id) if (result) { - showSuccessToast('Deleted', { position: 'bottom-right' }) + showSuccessToast('Webhook deleted', { position: 'bottom-right' }) } else { showErrorToast('Failed to delete', { position: 'bottom-right' }) } revalidate() } - async function onAdd(): Promise { + async function onCreate(): Promise { const result = await setWebhookMutation({ url, eventTypes }) if (result) { - showSuccessToast('Added', { position: 'bottom-right' }) + showSuccessToast('Webhook created', { position: 'bottom-right' }) } else { showErrorToast('Failed to add', { position: 'bottom-right' }) } @@ -82,7 +82,7 @@ export default function Webhooks(): JSX.Element { eventTypes, }) if (result) { - showSuccessToast('Updated', { position: 'bottom-right' }) + showSuccessToast('Webhook updated', { position: 'bottom-right' }) } else { showErrorToast('Failed to update', { position: 'bottom-right' }) } @@ -100,7 +100,7 @@ export default function Webhooks(): JSX.Element { {addModelOpen && (