From 93dda99aaa26ecad3ce717dda7f23554fe9b1ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Jurado=20Bujalance?= Date: Fri, 13 Jan 2023 22:45:08 +0100 Subject: [PATCH] use abbr as icon fallback --- src/components/bookmarks/item.jsx | 2 +- src/components/resolvedicon.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/bookmarks/item.jsx b/src/components/bookmarks/item.jsx index 17fcbe9ea..89dd698d1 100644 --- a/src/components/bookmarks/item.jsx +++ b/src/components/bookmarks/item.jsx @@ -19,7 +19,7 @@ export default function Item({ bookmark }) {
{bookmark.icon &&
- +
} {!bookmark.icon && bookmark.abbr} diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index 3dad2b0e2..8657a754b 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -1,9 +1,9 @@ import Image from "next/future/image"; -export default function ResolvedIcon({ icon, width = 32, height = 32 }) { +export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "logo" }) { // direct or relative URLs if (icon.startsWith("http") || icon.startsWith("/")) { - return logo; + return {alt}; } // mdi- prefixed, material design icons @@ -31,7 +31,7 @@ export default function ResolvedIcon({ icon, width = 32, height = 32 }) { src={`https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/${iconName}.png`} width={width} height={height} - alt="logo" + alt={alt} /> ); -} \ No newline at end of file +}