Skip to content

Commit

Permalink
fix incorrect demo code for promise toasts (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonFace0309 authored Dec 22, 2023
1 parent 7560716 commit 35514dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/src/components/Types/Types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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...',
Expand Down

1 comment on commit 35514dc

@vercel
Copy link

@vercel vercel bot commented on 35514dc Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.