I'm not happy with the setInterval inside the useEffect, it sometimes runs two intervals in parallel, couldn't replicate again when I tried, but I don't have a good idea about how we can improve it yet.
The timing function logic is now simpler, tried to use suggestive variable names, I initially used a one-liner and comments, something like:
https://github.com/MattGibney/DarkThrone/assets/13131778/804671d5-8931-477d-a615-0888026beac8
I'm not happy with the setInterval inside the useEffect, it sometimes runs two intervals in parallel, couldn't replicate again when I tried, but I don't have a good idea about how we can improve it yet.
The timing function logic is now simpler, tried to use suggestive variable names, I initially used a one-liner and comments, something like: