-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Menu active subitems and remove submenu from views (#10803)
Issues Fixed: https://pancakeswap.finance/liquidity/positions doesn't highlight Earn in menu Removing the dependency between views to make treeshaking work correctly Refactors: Instead of using seperate submenu components, make everything done in menu config <!-- 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 removing the `SubMenu` component from various views across the application, while also making adjustments to how active sub-menu items are determined and displayed in the menu configuration. ### Detailed summary - Deleted `SubMenu` from `PositionManagers`, `LandingV4`, `Farms`, `Predictions`, `Pools`, `CakeStaking`, and `Lottery` views. - Updated `getActiveSubMenuItem` to include additional matching logic for sub-menu items. - Modified `ConfigMenuItemsType` to include `overrideSubNavItems` and `matchHrefs`. - Enhanced menu configuration with new `overrideSubNavItems` for various menu items. - Adjusted `IfoPageLayout` to remove `SubMenuItems` and related logic. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
17 changed files
with
178 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.