From 35514dc90dd0af05851e400e64d95a6eae8b791e Mon Sep 17 00:00:00 2001 From: Charles Liu Date: Thu, 21 Dec 2023 21:38:12 -0500 Subject: [PATCH] fix incorrect demo code for promise toasts (#261) --- website/src/components/Types/Types.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/components/Types/Types.tsx b/website/src/components/Types/Types.tsx index 8f1b0e3..bf85405 100644 --- a/website/src/components/Types/Types.tsx +++ b/website/src/components/Types/Types.tsx @@ -85,7 +85,7 @@ const allTypes = [ }, { name: 'Promise', - snippet: `const promise = () => new Promise((resolve) => setTimeout(resolve, 2000)); + snippet: `const promise = () => new Promise((resolve) => setTimeout(() => resolve({ name: 'Sonner' }), 2000)); toast.promise(promise, { loading: 'Loading...',