pancake-toolkit icon indicating copy to clipboard operation
pancake-toolkit copied to clipboard

useModal is incompatible with react router links

Open Chef-Cheems opened this issue 3 years ago • 1 comments

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 avatar Oct 25 '21 14:10 Chef-Cheems

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

tzoeov avatar Nov 03 '21 14:11 tzoeov