soc_site-astro/src/components/letterList/SeriesList.astro
2025-04-27 11:50:28 -06:00

22 lines
450 B
Text

---
import { AlbumStatus } from '@prisma/client'
import prismaClient from 'utils/prisma-client'
interface Props {
letter: string
}
const { letter } = Astro.props
const albums = await prismaClient.series.findMany({
where: { name: { startsWith: letter } },
select: { slug: true, name: true }
})
---
{
albums.map((a) => (
<a class='text-left hover:bg-btn-gray/30 rounded-md p-2' href={`/series/${a.slug}`}>
{a.name}
</a>
))
}