Check if I can fix Netlify's deploy bug

This commit is contained in:
2022-01-24 09:44:17 -03:00
parent 02a5b40590
commit 7bb25a0e85

View File

@@ -181,6 +181,9 @@ const MainPomodoroTimer = (props) => {
} }
if (minutes === 0 && seconds === 0) { if (minutes === 0 && seconds === 0) {
setTimeout( () => {
setTimerActivity(false) setTimerActivity(false)
playAudio('work') playAudio('work')
@@ -190,10 +193,8 @@ const MainPomodoroTimer = (props) => {
new Notification('Pomodoro ended'); new Notification('Pomodoro ended');
} }
if (restCounter !== 3){ if (restCounter !== 3){
setTimeout( () => {
setPomodoroCounter('Pomodoros') setPomodoroCounter('Pomodoros')
setRestCounter((restCounter + 1)) setRestCounter((restCounter + 1))
@@ -201,20 +202,16 @@ const MainPomodoroTimer = (props) => {
setBreak(1, 0) setBreak(1, 0)
setWeAreInBreakTime(true) setWeAreInBreakTime(true)
}, 1000)
} }
if (restCounter === 3) { if (restCounter === 3) {
setTimeout( () => {
setPomodoroCounter('Pomodoros') setPomodoroCounter('Pomodoros')
setRestCounter((restCounter + 1)) setRestCounter((restCounter + 1))
setBreak(0, 1) setBreak(0, 1)
setWeAreInBreakTime(true) setWeAreInBreakTime(true)
}, 1000)
} }
if (!alreadyCountingEnd) { if (!alreadyCountingEnd) {
@@ -227,9 +224,9 @@ const MainPomodoroTimer = (props) => {
document.title = randomText('rest') document.title = randomText('rest')
} }
}, 1000)
} }
if (minutes >= 0 || seconds > 0) { if (minutes >= 0 || seconds > 0) {
idTimeOut = startTimer() idTimeOut = startTimer()
@@ -241,6 +238,9 @@ const MainPomodoroTimer = (props) => {
getFavicon().href = './img/rest favicon.ico' getFavicon().href = './img/rest favicon.ico'
if (minutes === 0 && seconds === 0) { if (minutes === 0 && seconds === 0) {
setTimeout( () => {
setTimerActivity(false) setTimerActivity(false)
playAudio('rest') playAudio('rest')
@@ -250,8 +250,6 @@ const MainPomodoroTimer = (props) => {
new Notification('Rest ended'); new Notification('Rest ended');
} }
setTimeout( () => {
if (restCounter === 4) { if (restCounter === 4) {
setPomodoroCounter('Long Rest') setPomodoroCounter('Long Rest')
setRestCounter(0) setRestCounter(0)