Skip to content

Commit 9db78f3

Browse files
committed
tweaked mcitem override to accept images
1 parent a731439 commit 9db78f3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/McItem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ export default function McItem({slug, pack, inline = true, size = 24, overrides
88
slug = slug.toLowerCase();
99
const packMap = {
1010
minecraft: (slug) => {
11-
const image = overrides.image === true ? '/img/x_button.png' : `/img/minecraft/${slug}.png`;
11+
const image = !!overrides.image ? `/img/minecraft/${overrides.image}.png` : `/img/minecraft/${slug}.png`;
1212
return {image, path: `https://minecraft.wiki/w/${slug}`};
1313
},
1414
techreborn: (slug) => {
15-
const image = overrides.image === true ? '/img/x_button.png' : `/img/techreborn/${slug}.png`;
15+
const image = !!overrides.image ? `/img/techreborn/${overrides.image}.png` : `/img/techreborn/${slug}.png`;
1616
const path = findIdInGlobal(slug);
1717
return {image, path};
1818
}

0 commit comments

Comments
 (0)