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

21 lines
403 B
Text

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