usmansbk / pomofocus

Pomofocus clone built with React & Redux

Home Page:https://pomofocus-lite.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pomodoro resets to 00:00 if the time is set to 1 min

ankitdbst opened this issue · comments

If the Pomodoro is set to 1 min and short break to 1 min, then after completion of the short break the Pomodoro resets to 00:00

// useCountdown.js

useEffect(() => {
setTime(time);
}, [time]);

If breaks.time === pomodoro.time, this count down won't be reset. Just pass mode as a prop and use that instead.