Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Search-All Top Results song play button working #491

Closed
5 tasks done
The-Phoenics opened this issue Jul 17, 2024 · 2 comments · Fixed by #493
Closed
5 tasks done

BUG: Search-All Top Results song play button working #491

The-Phoenics opened this issue Jul 17, 2024 · 2 comments · Fixed by #493
Assignees
Labels
bug Something isn't working gssoc level1

Comments

@The-Phoenics
Copy link
Contributor

The-Phoenics commented Jul 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

When the all section of search component is rendered for the first time . The play button doesn't work for the first time for the top song that appears below Top Results section.

This button does not work for the first song this happens, after changing to another song then using this button to play top song work.
button

Cause: We are currently using setCurrSong to switch between the songs in the music player. However, when this page is loaded for the first time the MusicPlayer load with the top song. So, in the onClick handler of this button we are using setCurrSong with same song again, which leads to no update in the currSong's state, preventing re-render.

onClick={() => {
setCurrSong(song);
setShouldAutoPlay(true);
storeSong(song);
console.log("song", song); }}

Record

  • I agree to follow this project's Code of Conduct
  • I have checked the existing issues
  • I'm a GSSOC'24 contributor
  • I want to work on this issue
Copy link

Congratulations, @The-Phoenics! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work! As per GSSoC'24 guidelines the person who raises the issue should be assigned for that issue. But if that person doesn't want to work on that issue the first come fist policy is follwed.

We'd also like to invite you to our Discord server! Join us on discord.

We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

@The-Phoenics
Copy link
Contributor Author

Hey @Satyam1923 @saurabhsingh720
Can you please assign me this issue under GSSoC'24 and kindly review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gssoc level1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants