Remove useMemo from interval

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-11-22 21:08:43 +01:00
parent 1adb1bd52f
commit 1e27263abb

View file

@ -49,7 +49,7 @@ export const UiNotificationToast: React.FC<UiNotificationProps> = ({
useInterval( useInterval(
() => setRemainingSteps((lastRemainingSteps) => lastRemainingSteps - 1), () => setRemainingSteps((lastRemainingSteps) => lastRemainingSteps - 1),
useMemo(() => (dismissed || remainingSteps <= 0 ? null : 1000 / STEPS_PER_SECOND), [dismissed, remainingSteps]) !dismissed && remainingSteps > 0 ? 1000 / STEPS_PER_SECOND : null
) )
useEffect(() => { useEffect(() => {