Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const timeFormat = new Intl.DateTimeFormat(undefined, {
hour: "2-digit",
minute: "2-digit",
})

export const formatBlockTime = (start: string, end?: Date) => {
const startDate = parseISO(start)
if (end) {
Expand Down
11 changes: 8 additions & 3 deletions src/app/conf/2025/schedule/_components/schedule-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export function ScheduleList({
[filterFields, scheduleData],
)

const firstDay = Object.values(filteredSessions)[0]
// if the first day has less than 3 sessions, it's probably a "day zero" with extra events or workshops
const firstDayIsDayZero = Object.keys(firstDay).length < 3
const startIndex = firstDayIsDayZero ? 0 : 1

return (
<>
<div className="flex justify-between gap-1 max-lg:flex-col">
Expand Down Expand Up @@ -171,11 +176,11 @@ export function ScheduleList({
<div className="mb-4 flex space-x-4">
{Object.keys(filteredSessions).map((date, index) => (
<a
href={`#day-${index + 1}`}
href={`#day-${index + startIndex}`}
key={date}
className="typography-link"
>
Day {index + 1}
Day {index + startIndex}
</a>
))}
</div>
Expand All @@ -187,7 +192,7 @@ export function ScheduleList({
>
<h3
className="bg-neu-50 py-4 dark:bg-neu-0"
id={`day-${index + 1}`}
id={`day-${index + startIndex}`}
>
{format(parseISO(date), "EEEE, MMMM d")}
</h3>
Expand Down