[ROMM-919] Use core icon when showing version

This commit is contained in:
Georges-Antoine Assi
2024-06-06 21:36:56 -04:00
parent 1e4fcb910f
commit 558c3eaeee

View File

@@ -1,10 +1,11 @@
<script setup lang="ts">
import { ref } from "vue";
import storeConfig from "@/stores/config";
const props = defineProps<{ slug: string }>();
const platformIconUrl = ref(
`/assets/platforms/${props.slug.toLowerCase()}.ico`
);
const configStore = storeConfig();
const slug = configStore.value.PLATFORMS_VERSIONS[props.slug] ?? props.slug;
const platformIconUrl = ref(`/assets/platforms/${slug.toLowerCase()}.ico`);
function onImageError() {
platformIconUrl.value = "/assets/platforms/default.ico";