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

[Bug]: Routing Bug When Using use-funnel/react-router-dom #105

Open
jw-r opened this issue Jan 22, 2025 · 2 comments
Open

[Bug]: Routing Bug When Using use-funnel/react-router-dom #105

jw-r opened this issue Jan 22, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@jw-r
Copy link

jw-r commented Jan 22, 2025

Package Scope

@use-funnel/react-router-dom

Bug description

When using use-funnel, navigating to the Funnel page prevents the user from accessing any other page. Any attempt to navigate to a different route results in the user being redirected back to the Funnel page via router.replace. This issue makes it impossible for users to leave the Funnel page.

Expected behavior

  • After visiting the Funnel page, users should be able to navigate to other pages freely.

To Reproduce

  1. Run a React project with use-funnel applied. codesandbox
  2. Navigate to the Funnel page from the GNB (global navigation bar).
  3. Attempt to navigate to another page using the GNB, and observe how the Funnel page uses router.replace to redirect the user back, making it impossible to leave the page.
  4. Try using the browser’s back button, and notice that the user is still unable to leave the Funnel page as the same redirection occurs.

Possible Solution

  • Reevaluate the conditions under which the useFunnel replace functionality is triggered.
  • Add appropriate checks to ensure that router.replace is only called when necessary.
  • Clearly define the termination conditions for the Funnel process and prevent unnecessary redirects after those conditions are met.

etc.

No response

@jw-r jw-r added the bug Something isn't working label Jan 22, 2025
@minuukang
Copy link
Member

Thank you for raising the issue.

Image

Your codesendbox example is not founded.. 😢
Post it again and we'll check it out!

@jw-r
Copy link
Author

jw-r commented Jan 23, 2025

Thank you for raising the issue.

Image Your codesendbox example is not founded.. 😢 Post it again and we'll check it out!

@minuukang
Thank you for checking it out.
Could you please try using CodeSandbox link again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants