From 2730fef54c390285fc22ea876e78131758a70dbe Mon Sep 17 00:00:00 2001 From: Thierry Goettelmann Date: Wed, 20 Sep 2023 16:05:06 +0200 Subject: [PATCH] Enhancement: add bookmarks description option (#2034) --- src/components/bookmarks/item.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/bookmarks/item.jsx b/src/components/bookmarks/item.jsx index a198de39f..f7946accd 100644 --- a/src/components/bookmarks/item.jsx +++ b/src/components/bookmarks/item.jsx @@ -5,7 +5,7 @@ import { SettingsContext } from "utils/contexts/settings"; import ResolvedIcon from "components/resolvedicon"; export default function Item({ bookmark }) { - const { hostname } = new URL(bookmark.href); + const description = bookmark.description ?? new URL(bookmark.href).hostname; const { settings } = useContext(SettingsContext); return ( @@ -21,7 +21,7 @@ export default function Item({ bookmark }) { >
- {bookmark.icon && + {bookmark.icon &&
@@ -30,7 +30,7 @@ export default function Item({ bookmark }) {
{bookmark.name}
-
{hostname}
+
{description}