MCPcopy Create free account
hub / github.com/api-platform/website / EventCard

Function EventCard

pwa/app/(common)/events/components/EventCard.tsx:14–57  ·  view source on GitHub ↗
({
  event,
  link,
  description,
}: EventCardProps)

Source from the content-addressed store, hash-verified

12}
13
14export default function EventCard({
15 event,
16 link,
17 description,
18}: EventCardProps) {
19 return (
20 <Card
21 key={event.title}
22 link={link || `/events/${event.slug}`}
23 className="flex flex-col | w-full sm:flex-row sm:min-h-[160px]"
24 >
25 <div className="hidden aspect-square h-full overflow-hidden relative sm:block">
26 <EventImage
27 width={160}
28 height={160}
29 event={event}
30 className="object-cover w-full h-full"
31 />
32 </div>
33 <div className="p-3 flex flex-1 flex-col items-start text-text-secondary dark:text-gray-300 text-sm">
34 <Chip color="blue" size="small" text={event.type} />
35 <div className="flex-1 mt-2 pb-4 sm:pb-2">
36 <Heading
37 size="sm"
38 level="h3"
39 className="line-clamp-2 text-blue-black dark:text-white "
40 >
41 {event.title}
42 </Heading>
43 {description ? (
44 <p className="text-sm line-clamp-2">{description}</p>
45 ) : null}
46 </div>
47 <EventResumeInfos
48 city={event.venue.city}
49 startDate={event.startDate.date}
50 endDate={event.endDate?.date}
51 highlightIcons
52 className="text-xs md:text-sm"
53 />
54 </div>
55 </Card>
56 );
57}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected