-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Liquidity redirect when leaks #11254
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
7 Skipped Deployments
|
|
useEffect(() => { | ||
if (typeof window !== 'undefined') { | ||
if (tokenIdFromUrl === 'pools') { | ||
window.location.replace('/liquidity/pools') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it needs to be full page reload when it leaks
PR-Codex overview
This PR updates the
PoolPage
component in theapps/web/src/pages/liquidity/[tokenId].tsx
file to improve URL redirection logic and handle invalid token IDs more effectively.Detailed summary
useEffect
to manage redirection usingwindow.location.replace
.redirect
function fromnext/navigation
.isValidNumber
to validate thetokenIdFromUrl
before parsing.parsedTokenId
assignment to check for validity.