Skip to content

Commit

Permalink
Starting Timer Sets Task Icon to InProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
jswitlyk committed Dec 18, 2023
1 parent a6351f7 commit 005278c
Show file tree
Hide file tree
Showing 3 changed files with 484 additions and 334 deletions.
23 changes: 8 additions & 15 deletions web/src/components/FocusTimeModal/FocusTimeModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const FocusTimeModal = ({
numPomosComplete,
updateNumPomosComplete,
setModalOpen,
setTaskStatus,
}) => {
console.log(taskPomos)

Expand Down Expand Up @@ -102,32 +103,23 @@ useEffect(() => {
}, [isOpen, taskNotes])
const { currentUser, reauthenticate } = useAuth()
const onTimerFinish = () => {

if (currentTab === 'pomodoro') {

if((numPomosComplete + 1) % 4 === 0)
{
if ((numPomosComplete + 1) % 4 === 0) {
setCurrentTab('long break')
}
else
{
} else {
setCurrentTab('short break')
}
} else if (currentTab == 'short break') {
if(numPomosComplete === taskPomos)
{
if (numPomosComplete === taskPomos) {
setModalOpen(false)
}
else{
} else {
setCurrentTab('pomodoro')
}

} else {
setCurrentTab('pomodoro')
}

//


//
}

return (
Expand Down Expand Up @@ -168,6 +160,7 @@ useEffect(() => {
updateNumPomosComplete={updateNumPomosComplete}
onTimerFinish={onTimerFinish}
setIsTimerRunning={setIsTimerRunning}
setTaskStatus={setTaskStatus}
/>

<Text
Expand Down
Loading

0 comments on commit 005278c

Please sign in to comment.