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: do nothing if switch to current app #4249

Merged

Conversation

cainiaokan
Copy link
Contributor

@cainiaokan cainiaokan commented May 10, 2024

Description

bug reproduction steps:

  1. enter any app detail page
  2. click header app switch nav button to show the app droplist
  3. try switch to the currently active app
  4. page rendering stuck at loading state

image
image

reason:
web/app/components/header/nav/nav-selector/index.tsx - switch app click handler set app as emptry by calling setAppDetail()
web/app/components/app/configuration/index.tsx - useEffect won't rerun coz the dependency [appId] hasn't change

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

switch to current selected app in header nav menu, the page can be rendered properly.

  • TODO

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code. 🐞 bug Something isn't working labels May 10, 2024
@zxhlyh zxhlyh requested a review from JzoNgKVO May 10, 2024 06:43
@cainiaokan cainiaokan changed the title do nothing if switch to current app fix: do nothing if switch to current app May 10, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 11, 2024
@crazywoola crazywoola merged commit 749b236 into langgenius:main May 11, 2024
7 checks passed
@takatost takatost mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants