We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0238ffb commit 6f1a4bbCopy full SHA for 6f1a4bb
front/taskwizard-front/src/components/StartableTask.tsx
@@ -70,12 +70,11 @@ const StartableTask = ({ task }: { task: TaskInterface }) => {
70
useEffect(() => {
71
const handleVisibilityChange = async () => {
72
if (!document.hidden) {
73
- console.log(startedRef.current);
74
- await stopTask(task.id);
75
- if (task.timeLeftToday <= 1) {
76
- handleStartedStateChange(_setStarted, false);
77
- } else if (startedRef.current) {
+ if (startedRef.current) {
+ await stopTask(task.id);
78
await startTask(task.id);
+ } else if (task.timeLeftToday <= 1) {
+ handleStartedStateChange(_setStarted, false);
79
}
80
81
};
0 commit comments