X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fcommon%2FZeldaIcon.js;h=9194cde7fc2f58b250f2e021a58c47e59bde9910;hb=6976d85a7117de53f7d42dee3de1f6b8fcb9726d;hp=c5da0b554cbc242322ea3f8c2ab0a2510c50a23f;hpb=c9ed47875647d76d5a794f69f173a1d7ac5984b0;p=alttp.git diff --git a/resources/js/components/common/ZeldaIcon.js b/resources/js/components/common/ZeldaIcon.js index c5da0b5..9194cde 100644 --- a/resources/js/components/common/ZeldaIcon.js +++ b/resources/js/components/common/ZeldaIcon.js @@ -74,6 +74,10 @@ const getIconURL = name => { case 'dungeon-tr': case 'dungeon-tt': return `/dungeon/${name.substr(8)}.png`; + case 'crystal-switch': + case 'crystal-switch-blue': + case 'crystal-switch-red': + return `/icon/${name}.png`; default: return ''; } @@ -84,14 +88,17 @@ const ZeldaIcon = ({ name }) => { const invert = name.startsWith('not-'); const strippedName = invert ? name.substr(4) : name; + const src = getIconURL(strippedName); const title = t(`icon.zelda.${name}`); return - {title} + {src ? + {title} + : null} {invert ?