Added logic for verify that half of the pomodoro is been maked before count it

This commit is contained in:
2021-09-24 22:04:05 -03:00
parent df90e04791
commit ab77b5ed48

View File

@@ -33,12 +33,17 @@ const MainPomodoroTimer = (props) => {
}
}
)
return {
minutes, seconds, breakTime
}
}
if (props.style === 'Regular'){
const minutes = 0
const seconds = 5
const minutes = 3
const seconds = 0
setMinutes(minutes)
setSeconds(seconds)
@@ -56,6 +61,10 @@ const MainPomodoroTimer = (props) => {
}
)
return {
minutes, seconds, breakTime
}
}
if (props.style === 'Creative work') {
@@ -77,6 +86,11 @@ const MainPomodoroTimer = (props) => {
}
}
)
return {
minutes, seconds, breakTime
}
}
if (props.style === 'Last minute delivery') {
@@ -98,6 +112,11 @@ const MainPomodoroTimer = (props) => {
}
}
)
return {
minutes, seconds, breakTime
}
}
}
@@ -247,9 +266,15 @@ const MainPomodoroTimer = (props) => {
} else if (props.timerOn === false && timerActivity === true){
if (!weAreInBreakTime) {
setPomodoroCounter('Pomodoros')
setRestCounter((restCounter + 1))
if (minutes < ( setTimeStyle().minutes / 2) ) {
setPomodoroCounter('Pomodoros')
setRestCounter((restCounter + 1))
}
}
@@ -272,8 +297,6 @@ const MainPomodoroTimer = (props) => {
setWeAreInBreakTime(false)
}
setTimeStyle()
setTimerActivity(false)
}