Filter only bookmarks and services with href

This commit is contained in:
shamoon 2023-10-05 15:12:42 -07:00
parent 53bf49f94e
commit 139f8b08ed

View File

@ -183,7 +183,7 @@ function Home({ initialSettings }) {
const { data: bookmarks } = useSWR("/api/bookmarks"); const { data: bookmarks } = useSWR("/api/bookmarks");
const { data: widgets } = useSWR("/api/widgets"); 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(() => { useEffect(() => {
if (settings.language) { if (settings.language) {