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 frontpage not loading correctly after logging in #3872

Merged
merged 1 commit into from May 6, 2023

Conversation

eikhr
Copy link
Member

@eikhr eikhr commented May 6, 2023

Description

There is a bug where the frontpage doesn't reload after logging in, so some data is missing. The poll doesn't show results, and the quotes-component looks like it is perpetually loading.
Screenshot 2023-05-06 at 18 52 41

This fixes it by adding props.loggedIn to the dependency array of the withPreparedEffect responsible for loading the frontpage. This means the frontpage will reload every time that prop changes.

Result

After the fix, the frontpage loads normally after logging in:)
Screenshot 2023-05-06 at 18 53 08

Testing

  • I have thoroughly tested my changes.

Resolves ... (either GitHub issue or Linear task)

@eikhr eikhr added review-needed Pull requests that need review bug-fix Pull requests that fix a bug small-fix Pull requests that fix something small labels May 6, 2023
Copy link
Member

@ivarnakken ivarnakken left a comment

Choose a reason for hiding this comment

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

💯

@ivarnakken ivarnakken added the approved Pull requests that have been approved label May 6, 2023
@eikhr eikhr merged commit d9da09d into master May 6, 2023
4 checks passed
@eikhr eikhr deleted the login-load-frontpage branch May 6, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved bug-fix Pull requests that fix a bug review-needed Pull requests that need review small-fix Pull requests that fix something small
Projects
None yet
2 participants