The previous solution did not clear interval after the time has passed. The "now" variable was not being updated in useEffect().
The previous solution did not clear interval after the time has passed. The "now" variable was not being updated in useEffect().