mirror of
https://github.com/FranP-code/Pomodoro-Timer-with-Clockify-integration.git
synced 2025-10-12 23:52:30 +00:00
Added logic for verify that half of the pomodoro is been maked before count it
This commit is contained in:
@@ -33,12 +33,17 @@ const MainPomodoroTimer = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
minutes, seconds, breakTime
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.style === 'Regular'){
|
if (props.style === 'Regular'){
|
||||||
|
|
||||||
const minutes = 0
|
const minutes = 3
|
||||||
const seconds = 5
|
const seconds = 0
|
||||||
|
|
||||||
setMinutes(minutes)
|
setMinutes(minutes)
|
||||||
setSeconds(seconds)
|
setSeconds(seconds)
|
||||||
@@ -56,6 +61,10 @@ const MainPomodoroTimer = (props) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
minutes, seconds, breakTime
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.style === 'Creative work') {
|
if (props.style === 'Creative work') {
|
||||||
@@ -77,6 +86,11 @@ const MainPomodoroTimer = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
minutes, seconds, breakTime
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.style === 'Last minute delivery') {
|
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){
|
} else if (props.timerOn === false && timerActivity === true){
|
||||||
|
|
||||||
|
|
||||||
if (!weAreInBreakTime) {
|
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)
|
setWeAreInBreakTime(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeStyle()
|
|
||||||
|
|
||||||
setTimerActivity(false)
|
setTimerActivity(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user