Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes: #101 that will be closed through this PR
Describe the changes you've made
Give a clear description what modifications you have made
I have created
audioRef
to reference the<audio>
element in the component.handlePlaySound
plays the audio if it's not already playing and starts the timer.handleStopSound
stops the audio if it's playing, resets the timer, and sets soundPlaying to false to indicate that the sound has stopped. and the timer stopped issue is also fixedType of change
Bug fix
What sort of change have you made:
How Has This Been Tested?
yes! i tested it and it absolutely working fine when i am tested. if this PR gets accepted i will suggest some more new features i have and i will contribute more to this. Please review the changes and accept the PR. sorry i worked without assigning the issue the task to me. As it is not mentioned in contributing guidelines so that's why i raised a PR. As i am a beginner i don't know if it is correct or not, if it is not correct excuse me for this time, and sorry for disrupting the community guidelines.
Describe how have you verified the changes made
by running the project locally,
npm install --legacy-peer-deps
after that making some file changes and thennpm start
Checklist:
Video Proof of what i have done (ignore the interruption they are just hydration errors, they will not come in production.)
Screen.Recording.2023-08-20.at.1.58.00.AM.mov
previoulsy the timer fluctuates and not worked when morethan one music playing. but i fixed this, to any one of the music is playing the timer will run, when no music is playing the timer will stop.