lcrojano / Giphy_Explorer

Search any gif from Giphy API
https://lcrojano.github.io/Giphy_Explorer/
MIT License
9 stars 29 forks source link

Duplicate GIFs Can Be Added to Favorites #77

Open AdityaGahukar opened 5 hours ago

AdityaGahukar commented 5 hours ago

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

  1. Search for a GIF and add it to favorites.
  2. Search for the same GIF again and add it to favorites.
  3. 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

Additional Context

This bug impacts user experience by cluttering the favorites list and reducing the usability of the feature.

Screenshots

Before image

Checklist

AdityaGahukar commented 5 hours ago

Hi @lcrojano ,

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.

Thanks!