File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
src/app/conf/2025/schedule/_components Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,19 @@ function getSessionsByDay(
101
101
}
102
102
}
103
103
104
+ const timeFormat = new Intl . DateTimeFormat ( undefined , {
105
+ hour : "2-digit" ,
106
+ minute : "2-digit" ,
107
+ } )
108
+ const formatBlockTime = ( start : string , end ?: string ) => {
109
+ const startDate = parseISO ( start )
110
+ if ( end ) {
111
+ const endDate = parseISO ( end )
112
+ return timeFormat . formatRange ( startDate , endDate )
113
+ }
114
+ return timeFormat . format ( startDate )
115
+ }
116
+
104
117
export interface ScheduleListProps {
105
118
showFilter ?: boolean
106
119
scheduleData : ScheduleSession [ ]
@@ -199,12 +212,9 @@ export function ScheduleList({
199
212
< div className = "mr-px flex flex-col max-lg:ml-px lg:flex-row" >
200
213
< div className = "relative border-neu-50 bg-neu-50 dark:bg-neu-0 max-lg:-mx-px max-lg:my-px max-lg:border-x lg:mr-px" >
201
214
< span className = "typography-body-sm mt-3 inline-block w-20 whitespace-nowrap pb-0.5 pl-4 lg:mr-6 lg:w-28 lg:pb-4 lg:pl-0" >
202
- { parseISO ( sessionDate ) . toLocaleTimeString (
203
- undefined ,
204
- {
205
- hour : "2-digit" ,
206
- minute : "2-digit" ,
207
- } ,
215
+ { formatBlockTime (
216
+ sessionDate ,
217
+ sessions [ 0 ] ?. event_end ,
208
218
) }
209
219
</ span >
210
220
</ div >
You can’t perform that action at this time.
0 commit comments