diff --git a/src/app/conf/2025/schedule/_components/filters.tsx b/src/app/conf/2025/schedule/_components/filters.tsx index c187890b06..daa2b7bf3b 100644 --- a/src/app/conf/2025/schedule/_components/filters.tsx +++ b/src/app/conf/2025/schedule/_components/filters.tsx @@ -97,6 +97,10 @@ export function ResetFiltersButton({ }) { const hasFilters = Object.values(filters).flat().length > 0 + if (!hasFilters) { + return null + } + return ( + + setFiltersState( + FilterStates.initial( + Object.keys(filterFields) as (keyof ScheduleSession)[], + ), + ) + } + className="max-lg:mb-4 max-lg:w-fit max-lg:self-end" + /> + {showFilter && ( + 1000 * 60 * 60 * 2 + ) { + timeMarker = null + } + return (
+ {timeMarker && ( +
+ now: + {timeMarker.currentTime} +
+ )} {hasDashedBorder && ( (new Date()) + + useEffect(() => { + const id = setInterval(() => setNow(new Date()), 60 * 1000) + return () => clearInterval(id) + }, []) + + const showNowMarkers = + now.getTime() >= CONFERENCE_START.getTime() && + now.getTime() <= CONFERENCE_END.getTime() + + const getTimeMarker = (sessionDate: string, blockEnd: Date) => { + const blockStart = new Date(sessionDate) + const isCurrentBlock = + showNowMarkers && + now.getTime() >= blockStart.getTime() && + now.getTime() < blockEnd.getTime() + + if (!isCurrentBlock) { + return null + } + + const blockDuration = blockEnd.getTime() - blockStart.getTime() + const timePassed = now.getTime() - blockStart.getTime() + const positionPercentage = Math.min( + 100, + Math.max(0, (timePassed / blockDuration) * 100), + ) + const currentTimeFormatted = format(now, "HH:mm") + + return { + positionPercentage, + currentTime: currentTimeFormatted, + } + } + + return { getTimeMarker } +} diff --git a/src/app/conf/_design-system/anchor.tsx b/src/app/conf/_design-system/anchor.tsx index 72c5635b83..5780c4e0e0 100644 --- a/src/app/conf/_design-system/anchor.tsx +++ b/src/app/conf/_design-system/anchor.tsx @@ -26,7 +26,16 @@ export const Anchor = forwardRef(function Anchor( return isInternal(props) ? ( ) : ( - + ) }) as (props: AnchorProps) => ReactElement