Skip to content

リダイレクトを行うと遷移履歴がおかしくなるのを修正 - #13

Merged
avaice merged 1 commit into
developfrom
fix-redirect
Apr 1, 2026
Merged

リダイレクトを行うと遷移履歴がおかしくなるのを修正#13
avaice merged 1 commit into
developfrom
fix-redirect

Conversation

@avaice

@avaice avaice commented Apr 1, 2026

Copy link
Copy Markdown
Owner

…gement

Copilot AI review requested due to automatic review settings April 1, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where performing a redirect results in an incorrect browser navigation history, by changing redirects to replace the current history entry rather than push a new one.

Changes:

  • Update Redirect to call history.replaceState instead of relying on the normal router navigation behavior.
  • Bypass useRouter()’s pushState-based navigation by using RouterContext’s internal setLocation directly for redirects.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@avaice
avaice merged commit 60be039 into develop Apr 1, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 19, 2026
9 tasks
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.

2 participants