<template>
    <div class="">
        <h1 class="text-3xl font-bold">Liste des receptions</h1>
        <ul>
            <li v-for="reception in receptionList" :key="reception.id">
                <NuxtLink :to="`/reception/${reception.id}`">Réception numéro {{ reception.id}}</NuxtLink>
            </li>
        </ul>
    </div>
</template>

<script setup lang="ts">
import type {ReceptionData} from "~/services/dto/reception-data";
import {getReceptionList} from "~/services/reception";

const receptionList = ref<ReceptionData[]>()

onMounted(async () => {
    receptionList.value = await getReceptionList()
})
</script>
