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

Fix: Side panel data not updating when different user cards are clicked #900

Conversation

AnujChhikara
Copy link
Contributor

@AnujChhikara AnujChhikara commented Oct 24, 2024

Date: 24 Oct 2024

Developer Name: Anuj Chhikara (anuj-chhikara-1)


Issue Ticket Number

Description

This PR resolves an issue where the side panel failed to update when selecting different user cards. Previously, the side panel always displayed data from the initially selected user, regardless of subsequent selections, leading to outdated information and impacting user navigation.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

brave_pbwdpUkSbY

Test Coverage

Change File Tests

image

Complete Tests

image

Additional Notes

To address the issue of production API calls during test runs, I have added the following conditional code in the utils module:

const API_BASE_URL =
  window.location.hostname === 'localhost'
    ? 'https://staging-api.realdevsquad.com'
    : window.API_BASE_URL;

Why This Change?

Before this update, tests were unintentionally hitting the production API. By adding this code, we ensure that only the staging API is called when tests run on this file. This setup also allows for mock data to be returned conditionally as needed, making tests more reliable and isolated from live data.

We already using this code in other script also for reference attaching image

@AnujChhikara AnujChhikara marked this pull request as ready for review October 24, 2024 15:06
users/discord/App.js Outdated Show resolved Hide resolved
@shubhdevelop
Copy link

Add the Screenshot of the test coverage that you added, not the success of all the test case

@shubhdevelop
Copy link

Add PR Description, of what changed

@iamitprakash iamitprakash merged commit 012ce6d into Real-Dev-Squad:develop Oct 29, 2024
@vinit717 vinit717 mentioned this pull request Nov 1, 2024
VaibhavSingh8 pushed a commit that referenced this pull request Nov 4, 2024
…ed (#900)

* Fix: Side panel data not updating when different user cards are clicked

* renamed the variable

* added tests

* using staging api url for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Side Panel Data Not Changing When Different User Cards are Clicked
5 participants