Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update weighted vote suggestion (#10884)
Code suggestion from #10858 <!-- 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 optimizing the calculation of voting results in the `WeightedVoteResults` and `Vote` components by replacing manual accumulation logic with utility functions from `lodash`, enhancing code readability and maintainability. ### Detailed summary - In `WeightedVoteResults.tsx`, replaced manual reduction of `choicesVotes` with `_mergeWith` from `lodash`. - In `Vote.tsx`, replaced manual construction of `newData` with `fromPairs` from `lodash` for cleaner code. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information