We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5236f3 commit 336e520Copy full SHA for 336e520
frontend/src/System/ListSystems.js
@@ -49,11 +49,7 @@ const ListSystems = (props) => {
49
50
let popularSystems = [];
51
if (isSuccess && systems.systems) {
52
- const sortedSystems = systems.systems.sort((a, b) => {
53
-
54
- return b.clientCount - a.clientCount;
55
- });
56
- popularSystems = sortedSystems.slice(0, 4);
+ popularSystems = systems.systems.toSorted((a, b) => b.clientCount - a.clientCount).slice(0, 4);
57
}
58
const handleContactClick = (system) => {
59
setContactSystem(system);
0 commit comments