multi cards
All checks were successful
Deploy App / build (push) Successful in 2m4s
Deploy App / deploy (push) Successful in 21s

This commit is contained in:
valere
2026-02-11 16:49:34 +01:00
parent 620112d9ba
commit 399519d1d4
8 changed files with 276 additions and 105 deletions

23
app/pages/random.vue Normal file
View File

@@ -0,0 +1,23 @@
<template>
<PlayingCard :card :isFaceUp />
</template>
<script setup lang="ts">
import type { Card } from '~~/types/types'
const { data: card, pending, error } = await useFetch<Card>('/api/card/random')
const isFaceUp = ref(false)
useHead({
title: computed(() =>
card.value ? `${card.value.artist} - ${card.value.title}` : 'Loading...'
)
})
onMounted(() => {
setTimeout(() => {
isFaceUp.value = true
}, 700)
})
</script>