Skip to content

Duplicate Buttons for Same City Search #38

@adaharshsingh

Description

@adaharshsingh

when users search for the same city multiple times. It shows the bug as shown in the image. i.e button become more than 3.

Proposed Solution

  • We need to modify the current logic to ensure that only three buttons are displayed for the most recent unique searches.
  • If a user searches for a city that already exists among the displayed buttons, it should not create a duplicate button but rather update the existing button's position.

Steps to Reproduce the bug

  • Search for Any city thrice , for examle , search for "Bhubaneswar."
  • Search for "Bhubaneswar" again two more times.
  • Now search for any random city like delhi
  • Observe that instead of showing three buttons, it results in more buttons with 3 Bhubaneswar buttons.

Screenshot 2024-10-09 152831

Expected Behavior

  • The application should display a maximum of three buttons for the most recent unique city searches.
  • If the user searches for a city already displayed, the button should update its position rather than create a new one.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions