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: Loop requests in toolbar #21061

Merged
merged 1 commit into from
Mar 21, 2024
Merged

fix: Loop requests in toolbar #21061

merged 1 commit into from
Mar 21, 2024

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Mar 21, 2024

Problem

I had moved the loading action to inside the component which was the right idea, but had a bad side effect in that it's parent would conditionally render it based on a loading state. This meant if the api request failed, it would re-render the component, triggering another request and entering a loop.

Changes

  • Moves this effect one level up to stop this happening

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

Manually

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

🚢

Copy link
Contributor

Size Change: -24 B (0%)

Total Size: 824 kB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 824 kB -24 B (0%)

compressed-size-action

@benjackwhite benjackwhite merged commit cca6ccb into master Mar 21, 2024
137 checks passed
@benjackwhite benjackwhite deleted the fix/toolbar-loop branch March 21, 2024 10:05
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.

3 participants