Skip to content

Commit

Permalink
Merge pull request #37 from timolins/persistent-toast
Browse files Browse the repository at this point in the history
  • Loading branch information
timolins authored Feb 22, 2021
2 parents 8cd1535 + a214271 commit 3e2c069
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/use-toaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const useToaster = (toastOptions?: DefaultToastOptions) => {

const now = Date.now();
const timeouts = toasts.map((t) => {
if (t.duration === Infinity) {
return;
}

const durationLeft =
(t.duration || 0) + t.pauseDuration - (now - t.createdAt);

Expand Down

1 comment on commit 3e2c069

@vercel
Copy link

@vercel vercel bot commented on 3e2c069 Feb 22, 2021

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.