Skip to content

Commit

Permalink
fix: image name for synthesis from imageKey (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno authored Jun 7, 2022
1 parent 8f83ef8 commit 07dd0af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion components/SynthesisImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand Down Expand Up @@ -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],
};
},
};
Expand Down
2 changes: 1 addition & 1 deletion pages/synthesis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{{ datum.item.name }}
</template>
<template #cell(portrait)="datum">
<SynthesisImg :name="datum.item.name" />
<SynthesisImg :name="datum.item.name" :image="datum.item.imageKey" />
</template>
<template #cell(location)="datum">
<span v-for="(location, key) in datum.item.locations" :key="key">
Expand Down

1 comment on commit 07dd0af

@vercel
Copy link

@vercel vercel bot commented on 07dd0af Jun 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

warframe-hub – ./

warframe-hub-git-dev-wfcd.vercel.app
hub.warframestat.us
warframe-hub-wfcd.vercel.app

Please sign in to comment.