From d2fa72c13e62fedc1a42fea54921603df75aabd9 Mon Sep 17 00:00:00 2001 From: Bjorn Lammers Date: Sun, 5 Jan 2025 22:30:42 +0100 Subject: [PATCH] fix: double declaration of iconName --- src/components/resolvedicon.jsx | 36 +++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index 50b8c926..4858f3d5 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -116,6 +116,25 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log ); } + if (icon.endsWith(".webp")) { + const iconName = icon.replace(".webp", ""); + return ( + {alt} + ); + } + const iconName = icon.replace(".png", ""); return ( log
       alt={alt}
     />
   );
-
-  const iconName = icon.replace( - ); }