Showing
3 changed files
with
27 additions
and
8 deletions
components/details/MovieGender.vue
0 → 100644
| 1 | +<script lang="ts" setup> | ||
| 2 | +//#region --Props--. | ||
| 3 | +import type { Genre } from "~/interfaces/movie"; | ||
| 4 | + | ||
| 5 | +const props = defineProps({ | ||
| 6 | + genres: { | ||
| 7 | + type: Array<Genre>, | ||
| 8 | + required: true, | ||
| 9 | + nullable: false, | ||
| 10 | + }, | ||
| 11 | +}); | ||
| 12 | +//#endregion | ||
| 13 | +</script> | ||
| 14 | + | ||
| 15 | +<template> | ||
| 16 | + <section class="mb-6"> | ||
| 17 | + <div class="flex flex-wrap gap-2"> | ||
| 18 | + <span v-for="genre in genres" :key="genre.id" class="px-3 py-1 bg-gray-800 rounded-full text-sm"> | ||
| 19 | + {{ genre.name }} | ||
| 20 | + </span> | ||
| 21 | + </div> | ||
| 22 | + </section> | ||
| 23 | +</template> | ||
| 24 | + | ||
| 25 | +<style scoped></style> |
| @@ -172,13 +172,7 @@ onMounted(() => { | @@ -172,13 +172,7 @@ onMounted(() => { | ||
| 172 | <details-score-and-vote :nb-vote="movie.vote_count" :score="movie.vote_average" /> | 172 | <details-score-and-vote :nb-vote="movie.vote_count" :score="movie.vote_average" /> |
| 173 | 173 | ||
| 174 | <!-- Genres --> | 174 | <!-- Genres --> |
| 175 | - <div class="mb-6"> | 175 | + <details-movie-gender :genres="movie.genres" /> |
| 176 | - <div class="flex flex-wrap gap-2"> | ||
| 177 | - <span v-for="genre in movie.genres" :key="genre.id" class="px-3 py-1 bg-gray-800 rounded-full text-sm"> | ||
| 178 | - {{ genre.name }} | ||
| 179 | - </span> | ||
| 180 | - </div> | ||
| 181 | - </div> | ||
| 182 | 176 | ||
| 183 | <!-- Synopsis --> | 177 | <!-- Synopsis --> |
| 184 | <div class="mb-6"> | 178 | <div class="mb-6"> |
-
Please register or login to post a comment