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

useModal is incompatible with react router links #312

Open
Chef-Cheems opened this issue Oct 25, 2021 · 1 comment
Open

useModal is incompatible with react router links #312

Chef-Cheems opened this issue Oct 25, 2021 · 1 comment
Labels
enhancement Enhancement on existing functionality

Comments

@Chef-Cheems
Copy link
Contributor

If you want to put Link inside modal in useModal it doesn't work since modals are rendered outside of router provider. We need to find a solution to be able to use react router links in modals, otherwise we forcing users to reload the site / open a new tab.

@Chef-Cheems Chef-Cheems added the enhancement Enhancement on existing functionality label Oct 25, 2021
@tzoeov
Copy link
Contributor

tzoeov commented Nov 3, 2021

Hey! You can import history from routerHistory.ts and just use history.push(..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement on existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants
@tzoeov @Chef-Cheems and others