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

#1830 Fix the incorrect route redirection bug #1831

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

SebinSong
Copy link
Collaborator

@SebinSong SebinSong commented Feb 4, 2024

closes #1830

I have left this as the comment inside the source-code too but,
This bug happens because Vue-router prematurely decides that the user is not logged in and takes the user to Home.vue while in reality the logging user in(here in main.js) is still in progress.
So as a fix, navigateToGroupPage in Home.vue needs a small addition there where it checks if that's what happened.

cc. @taoeffect

@SebinSong SebinSong self-assigned this Feb 4, 2024
Copy link

cypress bot commented Feb 4, 2024

Passing run #1849 ↗︎

0 110 8 0 Flakiness 0

Details:

Merge 57ecc78 into 36b7b59...
Project: group-income Commit: aa9c1a1f2f ℹ️
Status: Passed Duration: 10:41 💡
Started: Feb 4, 2024 12:34 AM Ended: Feb 4, 2024 12:45 AM

Review all test suite changes for PR #1831 ↗︎

Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

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

Sebin this was a perfect PR - and the comment you left was outstanding!

Comment on lines +100 to +106
// NOTE:
// When browser refresh is triggered, there is an issue that Vue router prematurely decides ('loginGuard' there) that
// the user is not signed in when in actual reality user-login is still being processed and then
// takes user to 'Home.vue' with the '$route.query.next' being set to the initial url.
// In this particular condition, the app needs to immediately redirect user to '$route.query.next'
// so that the user stays in the same page after the browser refresh.
// (Related GH issue: https://github.com/okTurtles/group-income/issues/1830)
Copy link
Member

Choose a reason for hiding this comment

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

This comment is perfect! Thanks for the thorough explanation and the link to the issue!

@taoeffect taoeffect merged commit 3c7a3ba into master Feb 4, 2024
4 checks passed
@taoeffect taoeffect deleted the sebin/task/#1830-refresh-bug-to-dashboard branch February 4, 2024 23:30
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.

Refresh bug takes us to the wrong page
2 participants