dashboard: fix: close error toasts individually (#2772)

Fixes #2656
This commit is contained in:
Zephyr (David B.M.)
2024-06-28 13:23:15 +02:00
committed by GitHub
parent 58919ba763
commit 8ea4210582
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'@nhost/dashboard': minor
---
fix: error toasts can be closed individually, instead of dismissing all toasts at once

View File

@@ -43,13 +43,13 @@ export default async function execPromiseWithErrorToast(
onError?.(error);
toast.custom(
const errorToastId = toast.custom(
(t) => (
<ErrorToast
isVisible={t.visible}
errorMessage={errorMessage}
error={error}
close={() => toast.dismiss()}
close={() => toast.dismiss(errorToastId)}
/>
),
{