From 4a88714a1605404ce71dffdda4416da190480b25 Mon Sep 17 00:00:00 2001 From: Francisco Pessano Date: Tue, 15 Feb 2022 11:46:54 -0300 Subject: [PATCH] Main Pomodoro Timer Fixes --- .../MainPomodoroTimer.jsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/Main Pomodoro Childrens/MainPomodoroTimer.jsx b/src/components/Main Pomodoro Childrens/MainPomodoroTimer.jsx index c900314..9201a11 100644 --- a/src/components/Main Pomodoro Childrens/MainPomodoroTimer.jsx +++ b/src/components/Main Pomodoro Childrens/MainPomodoroTimer.jsx @@ -291,15 +291,26 @@ const MainPomodoroTimer = (props) => { if (restCounter !== 3){ - setTimeout(() => { + setPomodoroCounter('Pomodoros') + setRestCounter((restCounter + 1)) - setPomodoroCounter('Pomodoros') + if (!alreadyCountingEnd) { + const time = getAndFormatCurrentTime(props.KonamiCodeActive) - setRestCounter((restCounter + 1)) + props.setEndTime(time) + setAlreadyCountingEnd(true) - setBreak(1, 0) - setWeAreInBreakTime(true) - }, 1) + props.setLetsUpload(true) + } + // setTimeout(() => { + + // setPomodoroCounter('Pomodoros') + + // setRestCounter((restCounter + 1)) + + // setBreak(1, 0) + // setWeAreInBreakTime(true) + // }, 1) } if (restCounter === 3) {