mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
19 lines
404 B
TypeScript
19 lines
404 B
TypeScript
|
import { Event } from "@prisma/client"
|
||
|
import Link from "next/link"
|
||
|
|
||
|
type EventListProps = {
|
||
|
data: Event[]
|
||
|
}
|
||
|
|
||
|
export function EventList(props: EventListProps) {
|
||
|
const contents = props.data.map(e => (
|
||
|
<li key={e.slug}>
|
||
|
<Link href={`/events/${e.slug}`}>
|
||
|
{e.name}
|
||
|
</Link>
|
||
|
</li>
|
||
|
))
|
||
|
|
||
|
return <ul className="list-events">{contents}</ul>
|
||
|
}
|