DEBUG dependance

This commit is contained in:
jleroy2023
2025-07-15 11:49:22 +02:00
parent e624d65afa
commit de9ca3c4c1
10 changed files with 122 additions and 203 deletions

21
pages/pokemon/_id.vue Normal file
View File

@@ -0,0 +1,21 @@
<template>
<v-container class="py-10">
<v-card v-if="pokemon" class="mx-auto max-w-xl p-6">
<h1 class="text-3xl font-bold mb-4">{{ pokemon.name.fr }}</h1>
<img :src="pokemon.sprites.regular" class="w-64 mx-auto mb-4" />
<p><strong>Génération :</strong> {{ pokemon.generation.name }}</p>
<p><strong>Types :</strong> {{ pokemon.types.map(t => t.name).join(', ') }}</p>
</v-card>
</v-container>
</template>
<script>
import axios from 'axios'
export default {
async asyncData({ params }) {
const { data } = await axios.get(`https://tyradex.vercel.app/api/v1/${params.id}`)
return { pokemon: data }
}
}
</script>