Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Pcsx user settings not considered reset and not disabled on firs…
…t click (#10874) Issues: If pcsx feature enabled and there is no user setting, disabling it not make reset button appear. Disabling the pcsx feature not work on first click and it has to be clicked again <!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `usePCSX` hook and related state management in the `smartRouter` module by adding a reset functionality and improving the handling of user preferences. ### Detailed summary - Updated `usePCSX` to return a reset function along with state. - Introduced `useCallback` for setting user preferences in `usePCSX`. - Modified `useUserXEnable` to return a reset function. - Enhanced `useRoutingSettingChanged` to include reset functionality for routing settings. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information