mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
Remove useMemo from interval
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
1adb1bd52f
commit
1e27263abb
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ export const UiNotificationToast: React.FC<UiNotificationProps> = ({
|
|||
|
||||
useInterval(
|
||||
() => setRemainingSteps((lastRemainingSteps) => lastRemainingSteps - 1),
|
||||
useMemo(() => (dismissed || remainingSteps <= 0 ? null : 1000 / STEPS_PER_SECOND), [dismissed, remainingSteps])
|
||||
!dismissed && remainingSteps > 0 ? 1000 / STEPS_PER_SECOND : null
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Reference in a new issue