Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/src/sandboxes/notification-hub/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function MessageHub({
})
)
},
config: (item, index, phase) => key => (phase === 'enter' && key === 'life' ? { duration: timeout } : config),
config: (item, index, phase) => key => phase === 'enter' && key === 'life' ? { duration: timeout } : config,
})

useEffect(() => {
Expand All @@ -67,7 +67,7 @@ function MessageHub({
<Button
onClick={(e: MouseEvent) => {
e.stopPropagation()
if (cancelMap.has(item)) cancelMap.get(item)()
if (cancelMap.has(item) && life.get() !== '0%') cancelMap.get(item)()
}}>
<X size={18} />
</Button>
Expand Down