mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-15 01:40:46 +02:00
24 lines
1015 B
Vue
24 lines
1015 B
Vue
<template>
|
|
<TrangaPage :back="backUrl ? { href: backUrl, icon: 'i-lucide-arrow-left', text: 'Back' } : undefined">
|
|
<template #title>
|
|
<h1 class="text-2xl">
|
|
Manga with Author <UBadge variant="outline" color="neutral" class="font-semibold text-xl ml-1">{{ author?.name }}</UBadge>
|
|
</h1>
|
|
</template>
|
|
<LoadingPage :loading="status === 'pending'">
|
|
<MangaCardList :manga="manga" @click="(m) => navigateTo(`/manga/${m.key}?return=${route.fullPath}`)" />
|
|
</LoadingPage>
|
|
</TrangaPage>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const route = useRoute();
|
|
const authorId = route.params.authorId as string;
|
|
const backUrl = route.query.return as string | undefined;
|
|
|
|
const { data: author } = await useApi('/v2/Author/{AuthorId}', { path: { AuthorId: authorId } });
|
|
const { data: manga, status } = await useApi('/v2/Manga/WithAuthorId/{AuthorId}', { path: { AuthorId: authorId }, lazy: true });
|
|
|
|
useHead({ title: 'Author Search' });
|
|
</script>
|