Skip to content

Commit

Permalink
feat: improve VideoCard
Browse files Browse the repository at this point in the history
  • Loading branch information
VachetVirginie committed Jul 1, 2023
1 parent cf08f1d commit bd96d1f
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/components/VideoCard.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<template>
<div class="m-5 p-5 bg-gray-200 rounded min-w-[40%]">
<div>
<h2 class="flex flex-wrap">{{ video.index }} - {{ video.title }}</h2>
<h2 class="flex flex-wrap">{{ props.video.index }} - {{ props.video.title }}</h2>
<img
:src="video.thumbnail"
:alt="video.title">
:src="props.video.thumbnail"
:alt="props.video.title">
</div>
<router-link :to="`/video/${video.id}`">Regarder la vidéo</router-link>
<router-link :to="`/video/${props.video.id}`">Regarder la vidéo</router-link>
</div>
</template>

<script>
export default {
name: "VideoCard",
props: {
video: {
type: Object,
required: true,
},
<script setup>
import { defineProps } from "vue";
const props = defineProps({
video: {
type: Object,
required: true,
},
};
});
</script>

<style scoped>
Expand Down

0 comments on commit bd96d1f

Please sign in to comment.