From 30ee825611f08351112e4c5e5ec7debfc1923fcc Mon Sep 17 00:00:00 2001 From: Denis Papec Date: Thu, 5 Oct 2023 20:02:26 +0100 Subject: [PATCH 1/3] Fix: Quicklaunch show only services with a link Signed-off-by: Denis Papec --- src/components/quicklaunch.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/quicklaunch.jsx b/src/components/quicklaunch.jsx index 0304f038e37..6eef0c05932 100644 --- a/src/components/quicklaunch.jsx +++ b/src/components/quicklaunch.jsx @@ -117,7 +117,7 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear ) } - setResults(newResults); + setResults(newResults.filter(r => r?.href)); if (newResults.length) { setCurrentItemIndex(0); From 53bf49f94e516c7a60bc4e0553c18421c586a979 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:05:16 -0700 Subject: [PATCH 2/3] Revert "Fix: Quicklaunch show only services with a link" This reverts commit 30ee825611f08351112e4c5e5ec7debfc1923fcc. --- src/components/quicklaunch.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/quicklaunch.jsx b/src/components/quicklaunch.jsx index 6eef0c05932..0304f038e37 100644 --- a/src/components/quicklaunch.jsx +++ b/src/components/quicklaunch.jsx @@ -117,7 +117,7 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear ) } - setResults(newResults.filter(r => r?.href)); + setResults(newResults); if (newResults.length) { setCurrentItemIndex(0); From 139f8b08edc70a045147bae72f28fb0a8eadd381 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:12:42 -0700 Subject: [PATCH 3/3] Filter only bookmarks and services with href --- src/pages/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 9367e8b4d88..201f472cbb8 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -183,7 +183,7 @@ function Home({ initialSettings }) { const { data: bookmarks } = useSWR("/api/bookmarks"); const { data: widgets } = useSWR("/api/widgets"); - const servicesAndBookmarks = [...services.map(sg => sg.services).flat(), ...bookmarks.map(bg => bg.bookmarks).flat()] + const servicesAndBookmarks = [...services.map(sg => sg.services).flat(), ...bookmarks.map(bg => bg.bookmarks).flat()].filter(i => i?.href); useEffect(() => { if (settings.language) {