mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
21 lines
403 B
Text
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>
|
|
))
|
|
}
|