diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index 141d88311..afbe31904 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -7,7 +7,6 @@ import { ThemeContext } from "utils/contexts/theme"; const iconSetURLs = { mdi: "https://cdn.jsdelivr.net/npm/@mdi/svg@latest/svg/", si: "https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/", - sh: "https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/", // or via GH's CDN https://icons.selfh.st/svg/ }; export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "logo" }) { @@ -36,6 +35,26 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log // check mdi- or si- prefixed icons const prefix = icon.split("-")[0]; + if (prefix === "sh") { + const iconName = icon.replace("sh-", "").replace(".svg", "").replace(".png", "").replace(".webp", ""); + const extension = icon.endsWith(".svg") ? "svg" : icon.endsWith(".webp") ? "webp" : "png"; + return ( + {alt} + ); + } + if (prefix in iconSetURLs) { // default to theme setting let iconName = icon.replace(`${prefix}-`, "").replace(".svg", "");