diff --git a/frontend/src/System/ListSystems.js b/frontend/src/System/ListSystems.js index da6536a4..388041c1 100644 --- a/frontend/src/System/ListSystems.js +++ b/frontend/src/System/ListSystems.js @@ -49,11 +49,7 @@ const ListSystems = (props) => { let popularSystems = []; if (isSuccess && systems.systems) { - const sortedSystems = systems.systems.sort((a, b) => { - - return b.clientCount - a.clientCount; - }); - popularSystems = sortedSystems.slice(0, 4); + popularSystems = systems.systems.toSorted((a, b) => b.clientCount - a.clientCount).slice(0, 4); } const handleContactClick = (system) => { setContactSystem(system);