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

fix: Back button not working after url changed by swap or query added

Open memoyil opened this issue 3 months ago • 2 comments


PR-Codex overview

This PR focuses on refactoring the replaceBrowserHistory functionality to use replaceBrowserHistoryMultiple, allowing for multiple URL parameter updates in a single call. This enhances code readability and performance by consolidating history state updates.

Detailed summary

  • Introduced replaceBrowserHistoryMultiple in replaceBrowserHistoryMultiple.ts.
  • Updated replaceBrowserHistory to handle undefined or null values using isUndefinedOrNull.
  • Replaced instances of replaceBrowserHistory with replaceBrowserHistoryMultiple across multiple components.
  • Enhanced URL state management in various files, including FlipButton.tsx, FormMain.tsx, and Twap.tsx, to handle multiple parameters efficiently.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

memoyil avatar Nov 02 '24 05:11 memoyil