From 2ee5fd123b2ed5253ca9d3328f27d99a8c908780 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 5 Jan 2025 07:58:28 -0800 Subject: [PATCH] code style --- src/pages/index.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index ffd920ed25a..acf23340d53 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -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 }) {