Update src/pages/index.jsx

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Adi Vaknin 2025-01-05 17:53:38 +02:00 committed by GitHub
parent f9ac4dd0cc
commit 6a16583aa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,11 +168,10 @@ const headerStyles = {
function getAllServices(services) {
function get(sg) {
let nestedServices = [];
let nestedServices = [...sg.services];
if (sg.groups.length > 0) {
nestedServices = [...nestedServices, ...sg.groups.map(get).flat()];
}
nestedServices = [...nestedServices, ...sg.services.flat()];
return nestedServices;
}