Users are currently able to add the same GIF multiple times to the favorites list, which results in duplicate entries. This behavior is not expected, as each GIF should only appear once in the favorites.
Steps to Reproduce
Search for a GIF and add it to favorites.
Search for the same GIF again and add it to favorites.
Navigate to the favorites page to observe that the GIF has been added multiple times.
Expected Behavior
When a user tries to add a GIF that already exists in the favorites, the app should prevent the duplicate entry and not add the GIF again.
Suggested Solution
Implement a check before adding a GIF to favorites to ensure that it does not already exist.
Update the favs.js file, specifically the setFavs function, to handle this scenario.
Additional Context
This bug impacts user experience by cluttering the favorites list and reducing the usability of the feature.
I have already implemented a solution that prevents duplicate GIFs from being added to favourites. Could you please assign this issue to me? I'll open a PR once assigned.
Description
Description
Users are currently able to add the same GIF multiple times to the favorites list, which results in duplicate entries. This behavior is not expected, as each GIF should only appear once in the favorites.
Steps to Reproduce
Expected Behavior
When a user tries to add a GIF that already exists in the favorites, the app should prevent the duplicate entry and not add the GIF again.
Suggested Solution
favs.js
file, specifically thesetFavs
function, to handle this scenario.Additional Context
This bug impacts user experience by cluttering the favorites list and reducing the usability of the feature.
Screenshots
Before
Checklist