11import Image from "next/image"
22import clsx from "clsx"
3- import { format , parseISO } from "date-fns"
43
54import { Tag } from "@/app/conf/_design-system/tag"
65import { CalendarIcon } from "@/app/conf/_design-system/pixelarticons/calendar-icon"
@@ -28,14 +27,6 @@ const DATE_FORMAT = new Intl.DateTimeFormat("en-US", {
2827} )
2928
3029export function ScheduleSection ( ) {
31- const sessionsByDay = new Map < string , SingaporeSession [ ] > ( )
32- for ( const session of singaporeSessions ) {
33- const day = session . start . slice ( 0 , 10 )
34- const list = sessionsByDay . get ( day ) ?? [ ]
35- list . push ( session )
36- sessionsByDay . set ( day , list )
37- }
38-
3930 return (
4031 < section
4132 id = "schedule"
@@ -49,20 +40,8 @@ export function ScheduleSection() {
4940 </ p >
5041 </ div >
5142
52- { Array . from ( sessionsByDay . entries ( ) ) . map ( ( [ day , sessions ] , dayIdx ) => (
53- < div key = { day } >
54- < Hr className = "mt-8 lg:mt-12" />
55- < h3 className = "typography-h3 px-2 pb-2 pt-8 text-neu-700 sm:px-3 lg:pt-12" >
56- { format ( parseISO ( day ) , "EEEE, MMMM d, yyyy" ) }
57- </ h3 >
58- { sessions . map ( ( session , i ) => (
59- < SessionBlock
60- key = { session . id }
61- session = { session }
62- isFirst = { dayIdx === 0 && i === 0 }
63- />
64- ) ) }
65- </ div >
43+ { singaporeSessions . map ( ( session , i ) => (
44+ < SessionBlock key = { session . id } session = { session } isFirst = { i === 0 } />
6645 ) ) }
6746 </ div >
6847 </ section >
@@ -78,25 +57,21 @@ function SessionBlock({
7857} ) {
7958 return (
8059 < article >
81- < Hr className = { isFirst ? "mt-4 " : "mt-12 lg:mt-16" } />
60+ < Hr className = { isFirst ? "mt-8 lg:mt-12 " : "mt-12 lg:mt-16" } />
8261 < SessionHeader session = { session } className = "px-2 pt-8 sm:px-3 lg:pt-12" />
8362 { session . description && (
84- < >
85- < Hr className = "mt-10 2xl:mt-16" />
86- < SessionDescription session = { session } />
87- </ >
63+ < div
64+ className = "typography-body-lg mt-8 flex flex-col gap-4 px-2 pb-8 sm:px-3 lg:mt-12 xl:pb-12 [&_a]:break-words"
65+ dangerouslySetInnerHTML = { {
66+ __html : formatDescription ( session . description ) ,
67+ } }
68+ />
8869 ) }
8970 { session . speakers . length > 0 && (
90- < >
91- < Hr />
92- < h4 className = "typography-h2 my-8 max-w-[408px] px-2 sm:px-3 lg:my-12" >
93- Session { session . speakers . length === 1 ? "speaker" : "speakers" }
94- </ h4 >
95- < SessionSpeakers
96- speakers = { session . speakers }
97- className = "-mx-px -mb-px"
98- />
99- </ >
71+ < SessionSpeakers
72+ speakers = { session . speakers }
73+ className = "-mx-px -mb-px border-t border-neu-200 dark:border-neu-100"
74+ />
10075 ) }
10176 </ article >
10277 )
@@ -146,20 +121,6 @@ function SessionHeader({
146121 )
147122}
148123
149- function SessionDescription ( { session } : { session : SingaporeSession } ) {
150- return (
151- < div className = "mt-8 flex gap-4 px-2 pb-8 max-lg:flex-col sm:px-3 lg:mt-16 lg:gap-8 xl:pb-16" >
152- < h4 className = "typography-h2 min-w-[320px]" > Session description</ h4 >
153- < div
154- className = "typography-body-lg flex flex-col gap-4 [&_a]:break-words"
155- dangerouslySetInnerHTML = { {
156- __html : formatDescription ( session . description ) ,
157- } }
158- />
159- </ div >
160- )
161- }
162-
163124function SessionSpeakers ( {
164125 speakers,
165126 className,
0 commit comments