This pull request fixes an issue where the timer would go into a negative countdown when the navigation link is clicked multiple times rapidly. The issue was caused by multiple overlapping timer instances running simultaneously.
Fix
Introduced a timerRunning flag to check if a timer is already running before starting a new one.
Set timerRunning to true when the timer starts and to false when it completes.
Description
This pull request fixes an issue where the timer would go into a negative countdown when the navigation link is clicked multiple times rapidly. The issue was caused by multiple overlapping timer instances running simultaneously.
Fix
timerRunning
flag to check if a timer is already running before starting a new one.timerRunning
totrue
when the timer starts and tofalse
when it completes.