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(ProfilePage): redirect to new user profile URL after user changing slug #585

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

belong112
Copy link
Contributor

Did a few adjustments

  1. Changed the condition !latestSlug to latestSlug === undefined since slug might be cleared.
  2. Redirect to /user?id={yourId} when latestSlug is null or empty.
  3. Replaced window.location.pathname with router.asPath because window.location.pathname cannot capture query parameters.

@coveralls
Copy link

Coverage Status

coverage: 71.733%. remained the same
when pulling 4c3de95 on belong112:bugfix/issue563
into 111cc23 on cofacts:master.

@belong112 belong112 changed the title fix(ProfilePage): redirect to new user profile URL after user changin… fix(ProfilePage): redirect to new user profile URL after user changing slug Nov 27, 2024
Copy link
Member

@MrOrz MrOrz left a comment

Choose a reason for hiding this comment

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

The logic is crystal clear. Let me merge it and try it on staging. Thank you for the contribution!

@MrOrz MrOrz merged commit 419a0d0 into cofacts:master Dec 9, 2024
2 checks passed
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.

Redirect to new user profile URL after the user removes their slug settings
3 participants