Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Jan 5, 2025
1 parent 86a1381 commit 2ee5fd1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ const headerStyles = {
};

function getAllServices(services) {
function get(sg) {
let nestedServices = [...sg.services];
if (sg.groups.length > 0) {
nestedServices = [...nestedServices, ...sg.groups.map(get).flat()];
function getServices(group) {
let nestedServices = [...group.services];
if (group.groups.length > 0) {
nestedServices = [...nestedServices, ...group.groups.map(getServices).flat()];
}
return nestedServices;
}

return [...services.map(get).flat()];
return [...services.map(getServices).flat()];
}

function Home({ initialSettings }) {
Expand Down

0 comments on commit 2ee5fd1

Please sign in to comment.