Front End Development Libraries Projects - Build a 25 + 5 Clock

Tell us what’s happening:

The tests were bugging out on codepen. I manually tested the functionality, and my app behaves the way it should. The problem may be related to using Date() with Hooks. especially when trying to get 60 minutes to display (an hour works, but the display wants to round up to 1 hour initially because I used Date()). there were a couple other weird behaviors caused by the tests, and I’m sure it relates to the use of Hooks over Class Components.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 OPR/

Challenge Information:

Front End Development Libraries Projects - Build a 25 + 5 Clock

The project was submitted, and I already claimed my certificate, but just in case… Please review my solution manually if necessary.

HI @vhiv94

You still need to work on this project, 13 out of 29 tests are passing.

The reset button should change the session label to "Session"

  function resetTimer() {
    setTimer(new Date(1500000));

When reset is triggered, the audio is not paused and rewound to the beginning.

I don’t think the session and break labels are meant to be numbered.

Also, during testing the timer kept pausing.

Happy coding

I forgot to finish the reset function, thank you. and since I added session numbers it resets that too now. Thank You.

1 Like

The timeout I used to actually show 00:00 before changing over the timer type needed to be cleared when the reset button is clicked as well.