From 07dd0af2b0b2a5053a81fb038ca989024859b7dd Mon Sep 17 00:00:00 2001 From: Matt Voboril Date: Mon, 6 Jun 2022 21:18:07 -0500 Subject: [PATCH] fix: image name for synthesis from imageKey (#800) --- components/SynthesisImg.vue | 5 ++++- pages/synthesis.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/SynthesisImg.vue b/components/SynthesisImg.vue index 827bd673..a823a1c0 100644 --- a/components/SynthesisImg.vue +++ b/components/SynthesisImg.vue @@ -7,6 +7,8 @@ import HubImg from '@/components/HubImg'; import { optimize, cdn } from '@/services/utilities'; +const translate = (stub) => (stub ? optimize(cdn(`webp/synthesis/${stub}.webp`)) : null); + const imgs = { 'Ancient Disruptor': optimize(cdn('webp/synthesis/ancient_disruptor.webp')), 'Ancient Healer': optimize(cdn('webp/synthesis/ancient_healer.webp')), @@ -67,11 +69,12 @@ export default { type: String, default: '100px', }, + image: { type: String, required: true }, }, data() { return { target: this.name, - src: imgs[this.name], + src: translate(this.image) || imgs[this.name], }; }, }; diff --git a/pages/synthesis.vue b/pages/synthesis.vue index aa23248c..142f5495 100644 --- a/pages/synthesis.vue +++ b/pages/synthesis.vue @@ -65,7 +65,7 @@ {{ datum.item.name }}