From 40522fbb96ef905be4a2e05300360484b7fa833f Mon Sep 17 00:00:00 2001 From: Denis Papec Date: Thu, 5 Oct 2023 23:14:25 +0100 Subject: [PATCH] Fix: Quicklaunch shows also services without a url (#2136) * Fix: Quicklaunch show only services with a link Signed-off-by: Denis Papec * Revert "Fix: Quicklaunch show only services with a link" This reverts commit 30ee825611f08351112e4c5e5ec7debfc1923fcc. * Filter only bookmarks and services with href --------- Signed-off-by: Denis Papec Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- 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 9367e8b4d..201f472cb 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) {