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] Add replace prop to <Navigate> in NavigateToFirstResource #10267

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

aqeebpathan
Copy link
Contributor

@aqeebpathan aqeebpathan commented Oct 9, 2024

Problem

This PR addresses issue #10262 with navigation in the React Admin application, where users experience redirect loops when transitioning from the admin panel to the first resource.

Solution

The solution involves adding the replace={true} prop to the <Navigate> component in the NavigateToFirstResource. This change ensures that the navigation history is correctly updated, allowing users to return to their previous page without being redirected again.

Closes #10262

How To Test

  1. Navigate to the non-RA part of the application.
  2. Go to the /admin path.
  3. Verify that navigating back returns you to the previous page without redirects to the first resource.

Additional Checks

  • The PR targets next for a bugfix.
  • The PR includes unit tests (not included as this change pertains to routing behavior, which is not easily testable with unit tests)
  • The PR includes one or several stories (not applicable, as this change does not require new stories)
  • The documentation is up to date.

@fzaninotto fzaninotto merged commit 0948cf3 into marmelab:next Oct 17, 2024
13 checks passed
@fzaninotto fzaninotto added this to the 5.3.0 milestone Oct 17, 2024
@aqeebpathan aqeebpathan deleted the fix/admin-redirect branch October 22, 2024 16:59
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