diff --git a/front/src/components/Gallery/item.vue b/front/src/components/Gallery/item.vue index 0223925..6673e06 100644 --- a/front/src/components/Gallery/item.vue +++ b/front/src/components/Gallery/item.vue @@ -7,10 +7,13 @@ import { getRandomIntInclusive } from "../../helpers"; const props = defineProps(['files']) const cover = getRandomIntInclusive(0, props.files.length) -const coverImg = props.files.length > 1 ? `url(${props.files[cover]})` : 'url(/src/assets/promo/map.png)' +const coverImg = props.files.length > 1 ? `url(${IMAGE_URL}/${props.files[cover].file})` : 'url(/src/assets/promo/map.png)' onMounted(async () => { - const files = props.files.length > 1 ? props.files.splice(cover, 1) : props.files + const files = props.files.slice(0) + if (files.length > 1) { + files.splice(cover, 1) + } // const width = 1920 // const height = 1080