-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NNS1-3548: Add compare functions for projects table (#6283)
# Motivation We want to allow the user to change the order in the projects table by clicking on the table headers, similar to the neurons table. When clicking the "Nervous Systems" header, the projects should be ordered alphabetically by name. When clicking the "Neurons" header, the projects should be ordered number of neurons. When clicking the "Stake" header, the projects should be ordered by: 1. USD value of the stake 2. Projects without exchange rate but positive number of neurons before projects with zero neurons. 3. Within projects with the same (probably 0) USD stake, ICP should be sorted before others. This PR adds the sorting functions. It does not add the functionality in the table. # Changes 1. Add necessary compare functions. # Tests 1. Unit tests added. 2. Tested manually (with additional changes) at https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/tokens/ # Todos - [ ] Add entry to changelog (if necessary). not yet
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 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