Skip to content

Commit

Permalink
Merge pull request #1 from SlovakNationalGallery/fix/image-for-code
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-kamil authored Oct 27, 2023
2 parents f2ed74d + 501e257 commit 81f7521
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/views/ItemDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
<div class="relative h-full border-black px-4 pb-24 pt-8">
<div class="absolute -top-8 inline-block rounded-md bg-black p-1.5" v-if="item.code">
<img class="h-9 w-9" :src="`/img/${item.code}.svg`" :alt="item.code" />
<img class="h-9 w-9" :src="codeImage" :alt="item.code" />
</div>
<h2 class="text-1.5xl font-bold">{{ item.title }}</h2>
<h3 class="text-lg text-gray-dark">{{ item.author }} · {{ item.dating }}</h3>
Expand Down Expand Up @@ -140,4 +140,9 @@ onMounted(async () => {
bucketlistStore.get(defaultBucketlist.id) || (await bucketlistStore.load(defaultBucketlist.id))
}
})
const codeImage = computed(() => {
return `${import.meta.env.VITE_API_URL}/img/${item.value.code}.svg`
})
</script>

0 comments on commit 81f7521

Please sign in to comment.