@@ -6,27 +6,7 @@ import {
66 MapPinIcon ,
77 CalendarDaysIcon ,
88} from "@heroicons/react/24/outline" ;
9- import type { HTEvent , HTPerson } from "@/types/db" ;
10-
11- /** Types (match your data) */
12- export type PersonLink = {
13- title : string ;
14- url : string ;
15- sort_order ?: number | null ;
16- } ;
17- export type PersonEvent = {
18- id : number | string ;
19- title : string ;
20- begin : string | number | Date ;
21- end : string | number | Date ;
22- location ?: { name ?: string | null } | string | null ;
23- content_id : number | string ;
24- color ?: string | null ;
25- } ;
26- export type Affiliation = {
27- organization ?: string | null ;
28- title ?: string | null ;
29- } ;
9+ import type { HTConference , HTEvent , HTPerson } from "@/types/db" ;
3010
3111/** ---------- utilities ---------- */
3212
@@ -75,12 +55,11 @@ function nonEmpty<T>(x: T | null | undefined): x is T {
7555/** ---------- component ---------- */
7656
7757export default function PersonDetails ( {
78- confCode ,
58+ conference ,
7959 person,
8060 events,
81- timeZone, // optional: pass conference TZ like "America/Los_Angeles"
8261} : {
83- confCode : string ;
62+ conference : HTConference ;
8463 person : HTPerson ;
8564 events : HTEvent [ ] ;
8665 timeZone ?: string ;
@@ -131,11 +110,11 @@ export default function PersonDetails({
131110
132111 { /* Back to People */ }
133112 < Link
134- to = { `/people?conf=${ encodeURIComponent ( confCode ) } ` }
113+ to = { `/people?conf=${ encodeURIComponent ( conference . code ) } ` }
135114 className = "inline-flex items-center gap-2 rounded-lg border border-gray-700 px-3 py-2 text-sm text-gray-200 hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500"
136115 >
137116 < ArrowLeftIcon className = "h-5 w-5" aria-hidden = "true" />
138- < span className = "sr-only md:not-sr-only" > Back </ span >
117+ < span className = "sr-only md:not-sr-only" > People </ span >
139118 </ Link >
140119 </ div >
141120
@@ -206,13 +185,13 @@ export default function PersonDetails({
206185 </ h2 >
207186 < ul role = "list" className = "space-y-4" >
208187 { sortedEvents . map ( ( e ) => {
209- const when = fmtTimeRange ( e . begin , e . end , timeZone ) ;
188+ const when = fmtTimeRange ( e . begin , e . end , conference . timezone ) ;
210189 const where = getLocationName ( e . location ) ;
211190 const id = String ( e . id ) ;
212191 return (
213192 < li key = { `${ id } -${ e . title } ` } >
214193 < Link
215- to = { `/event?conf=${ encodeURIComponent ( confCode ) } &event=${ encodeURIComponent (
194+ to = { `/event?conf=${ encodeURIComponent ( conference . code ) } &event=${ encodeURIComponent (
216195 id
217196 ) } `}
218197 className = "group block rounded-xl border border-gray-700 bg-gray-700/60 transition hover:bg-gray-600/60 focus:outline-none focus:ring-2 focus:ring-indigo-500"
0 commit comments