Skip to content

Commit

Permalink
fixed bug with location and missing function
Browse files Browse the repository at this point in the history
  • Loading branch information
makersmecca committed Nov 8, 2024
1 parent 334ad73 commit e2b78b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/DisplayTimer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const DisplayTimer = ({
}, [componentName, timer.isRunning]);

useEffect(() => {
toggleTimerState(timer.isRunning);
location === "/" && toggleTimerState(timer.isRunning);
timer.isRunning && location === "/"
? (document.body.style.backgroundColor = "#3c3d37")
: (document.body.style.backgroundColor = "#fff4ea");
Expand Down

0 comments on commit e2b78b8

Please sign in to comment.