From 671fb5de87058eb29238cd80ae6a0370a4c37fb6 Mon Sep 17 00:00:00 2001 From: Benoit Pingris Date: Fri, 13 Sep 2024 23:32:57 +0200 Subject: [PATCH] fix: await the promise to be able to catch its error and render an error toast --- example/src/ToastDemo.tsx | 21 ++++++++++++-- src/toast.tsx | 59 +++++++++++++++++++++------------------ 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/example/src/ToastDemo.tsx b/example/src/ToastDemo.tsx index ffdc200..3be94c1 100644 --- a/example/src/ToastDemo.tsx +++ b/example/src/ToastDemo.tsx @@ -97,13 +97,30 @@ export const ToastDemo: React.FC = () => { />