File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
src/app/conf/2025/schedule/_components Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,12 @@ export function ScheduleList({
223
223
blockEnd . getTime ( ) === nextBlockStart ?. getTime ( ) &&
224
224
! isBreak
225
225
226
+ const endTimesDiffer = sessions . some (
227
+ session =>
228
+ new Date ( session . event_end ) . getTime ( ) !==
229
+ blockEnd . getTime ( ) ,
230
+ )
231
+
226
232
return (
227
233
< div
228
234
key = { `concurrent sessions on ${ sessionDate } ` }
@@ -231,7 +237,10 @@ export function ScheduleList({
231
237
< div className = "mr-px flex flex-col max-lg:ml-px lg:flex-row" >
232
238
< 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" >
233
239
< span className = "typography-body-sm mt-3 inline-block w-28 whitespace-nowrap pb-0.5 pl-4 lg:mr-6 lg:pb-4 lg:pl-0" >
234
- { formatBlockTime ( sessionDate , blockEnd ) }
240
+ { formatBlockTime (
241
+ sessionDate ,
242
+ endTimesDiffer ? undefined : blockEnd ,
243
+ ) }
235
244
</ span >
236
245
</ div >
237
246
< div className = "relative flex w-full flex-col items-end gap-px lg:flex-row lg:items-start" >
@@ -242,6 +251,7 @@ export function ScheduleList({
242
251
year = { year }
243
252
eventsColors = { eventsColors }
244
253
blockEnd = { blockEnd }
254
+ durationVisible = { endTimesDiffer }
245
255
/>
246
256
) ) }
247
257
</ div >
Original file line number Diff line number Diff line change @@ -30,11 +30,13 @@ export function ScheduleSessionCard({
30
30
year,
31
31
eventsColors,
32
32
blockEnd,
33
+ durationVisible,
33
34
} : {
34
35
session : ScheduleSession
35
36
year : `202${number } `
36
37
eventsColors : Record < string , string >
37
38
blockEnd : Date
39
+ durationVisible : boolean
38
40
} ) {
39
41
let eventType = session . event_type
40
42
@@ -140,10 +142,7 @@ export function ScheduleSessionCard({
140
142
{ session . venue }
141
143
</ span >
142
144
) }
143
- < SessionDuration
144
- session = { session }
145
- blockTimeFraction = { blockTimeFraction }
146
- />
145
+ { durationVisible && < SessionDuration session = { session } /> }
147
146
< AddToCalendarLink
148
147
eventTitle = { eventTitle }
149
148
session = { session }
@@ -160,13 +159,9 @@ export function ScheduleSessionCard({
160
159
161
160
function SessionDuration ( {
162
161
session,
163
- blockTimeFraction,
164
162
} : {
165
163
session : ScheduleSession
166
- blockTimeFraction : number
167
164
} ) : React . ReactNode {
168
- if ( blockTimeFraction >= 1 ) return null
169
-
170
165
const durationMs =
171
166
new Date ( session . event_end ) . getTime ( ) -
172
167
new Date ( session . event_start ) . getTime ( )
You can’t perform that action at this time.
0 commit comments