diff --git a/frontend/src/components/courses/CourseDetailCard.vue b/frontend/src/components/courses/CourseDetailCard.vue index dc5689c9..fae89e68 100644 --- a/frontend/src/components/courses/CourseDetailCard.vue +++ b/frontend/src/components/courses/CourseDetailCard.vue @@ -4,6 +4,7 @@ import Button from 'primevue/button'; import { type Course } from '@/types/Course.ts'; import { PrimeIcons } from 'primevue/api'; import { useI18n } from 'vue-i18n'; +import { useGlob } from '@/composables/glob.ts'; /* Component props */ defineProps<{ @@ -12,14 +13,7 @@ defineProps<{ /* Composable injections */ const { t } = useI18n(); - -/* Default image thumbnails */ -const images = Object.keys( - import.meta.glob('@/assets/img/placeholders/*', { - eager: true, - query: 'url', - }), -); +const { getRandomImport } = useGlob(import.meta.glob('@/assets/img/placeholders/*.png', { eager: true }));