You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify the behaviour of upload song button so its disabled while waiting for the song to be uploaded.
Context
In component AddSongPlayListAccordion.tsx when the user decides to upload a song the function handleSubmitSong is called. This function triggers an style change of the button so it displays a loading animation . The issues is that the user can still click it even if the upload song request is already being made.
The goal is to disable the button while still showing the loading animation so the user cannot upload the same song twice.
This feature of uploading songs is currently only available for artists.
It might be necessary to create an artist user using the interface of backend because right now theres no frontend component to register artists.
How to do it
Manage an state of the request variable that disables/enables the button.
Testing
Create an artist, upload a song and check if the button goes disable and has a loading animation while the request is being processed.
Create a test that checks if the button is disabled when the request is being made.
The text was updated successfully, but these errors were encountered:
Description
Modify the behaviour of upload song button so its disabled while waiting for the song to be uploaded.
Context
In component AddSongPlayListAccordion.tsx when the user decides to upload a song the function
handleSubmitSong
is called. This function triggers an style change of the button so it displays a loading animation . The issues is that the user can still click it even if the upload song request is already being made.The goal is to disable the button while still showing the loading animation so the user cannot upload the same song twice.
How to do it
Manage an state of the request variable that disables/enables the button.
Testing
The text was updated successfully, but these errors were encountered: