Skip to content

OBPIH-6944 Content refreshes twice when switching tabs#5052

Merged
awalkowiak merged 4 commits intodevelopfrom
OBPIH-6944-4
Feb 18, 2025
Merged

OBPIH-6944 Content refreshes twice when switching tabs#5052
awalkowiak merged 4 commits intodevelopfrom
OBPIH-6944-4

Conversation

@SebastianLib
Copy link
Collaborator

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

Link to GitHub issue or Jira ticket:

Description:


📷 Screenshots & Recordings (optional)

If this PR contains a UI change, consider adding one or more screenshots here or link to a screen recording to help reviewers visualize the change. Otherwise, you can remove this section.

@github-actions github-actions bot added the domain: frontend Changes or discussions relating to the frontend UI label Feb 17, 2025
// to prevent unnecessary API calls when switching between tabs
useEffect(() => {
if (shouldFetch) {
if (shouldFetch && tab === filterParams.tab) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use this condition when passing shouldFetch. It's the idea of this property.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that this hook should be reusable, so what happens when we don't have tabs? that's the additional reason for shouldFetch

@codecov
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.84%. Comparing base (4b8ba88) to head (fe50d3d).
Report is 201 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##             develop   #5052      +/-   ##
============================================
- Coverage       7.88%   7.84%   -0.04%     
+ Complexity       884     876       -8     
============================================
  Files            625     625              
  Lines          42813   42813              
  Branches       10376   10376              
============================================
- Hits            3375    3358      -17     
- Misses         38933   38952      +19     
+ Partials         505     503       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@awalkowiak awalkowiak merged commit 37f4bbc into develop Feb 18, 2025
9 checks passed
@awalkowiak awalkowiak deleted the OBPIH-6944-4 branch February 18, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants