@@ -10,6 +10,7 @@ import { StripesDecoration } from "../../_design-system/stripes-decoration"
1010import { SocialIcon , SocialIconType } from "../../_design-system/social-icon"
1111
1212import styles from "./speaker-card.module.css"
13+ import { returningSpeakers , speakerSessions } from "../_data"
1314
1415export interface SpeakerCardProps extends React . HTMLAttributes < HTMLDivElement > {
1516 tags ?: string [ ]
@@ -42,7 +43,7 @@ export function SpeakerCard({
4243 < SpeakerLinks speaker = { speaker } className = "absolute right-6 top-6" />
4344 ) }
4445
45- < div className = "relative aspect-square shrink-0 overflow-hidden @[420px]:basis -[176px]" >
46+ < div className = "relative aspect-square shrink-0 overflow-hidden @[420px]:size -[176px]" >
4647 < div className = "absolute inset-0 z-[1] bg-sec-light mix-blend-multiply" />
4748 { speaker . avatar ? (
4849 < Image
@@ -67,14 +68,15 @@ export function SpeakerCard({
6768 < div className = "flex flex-1 flex-col gap-2" >
6869 < div className = "flex flex-col gap-1" >
6970 < h3 className = "typography-body-lg" > { speaker . name } </ h3 >
70- < p className = "text-neu-800 typography-body-sm" >
71+ < p className = "line-clamp-1 text-neu-800 typography-body-sm" >
7172 { [
7273 speaker . position ,
7374 speaker . company === "-" ? "" : speaker . company ,
7475 ]
7576 . filter ( Boolean )
7677 . join ( ", " ) }
7778 </ p >
79+ < SpeakerTags speaker = { speaker } className = "my-3" />
7880 </ div >
7981 { speaker . about && (
8082 < p className = "line-clamp-3 text-neu-800 typography-body-sm" >
@@ -150,3 +152,26 @@ function Stripes() {
150152 </ div >
151153 )
152154}
155+
156+ function SpeakerTags ( {
157+ speaker,
158+ className,
159+ } : {
160+ speaker : SchedSpeaker
161+ className ?: string
162+ } ) {
163+ const eventType = speakerSessions . get ( speaker . username ) ?. [ 0 ] ?. event_type
164+
165+ return (
166+ < div className = { clsx ( "flex basis-0 flex-wrap gap-2" , className ) } >
167+ { eventType && (
168+ < Tag color = { eventsColors [ eventType ] || "hsl(var(--color-sec-base))" } >
169+ { eventType }
170+ </ Tag >
171+ ) }
172+ { returningSpeakers . has ( speaker . name ) && (
173+ < Tag color = "hsl(var(--color-neu-500))" > Returning speaker</ Tag >
174+ ) }
175+ </ div >
176+ )
177+ }
0 commit comments