import { Link } from '@tanstack/react-router' import { ChevronRight } from 'lucide-react' import type { WeekendContext } from '../../types' import { RacePreviewPage } from '../../pages/RacePreviewPage' import { CountdownDisplay, Flag, SeasonNavStrip, SessionTimeline } from './shared' /** * PreSessionView folds the race preview surface into the Weekend home so there is * no separate Preview destination. It reuses the existing preview page content and * frames it with the next-session countdown and compact season navigation. */ export function PreSessionView({ context, now }: { context: WeekendContext; now: Date }) { const next = context.next_event const nextStart = context.next_session?.date_start ?? next?.next_session_start ?? next?.date_start return (
Pre-session
{next && (

{next.meeting_name}

{context.next_session?.session_name ?? next.next_session_name ?? 'Next session'}
Live timing
)} {context.sessions && context.sessions.length > 0 && }
{context.season_rounds && context.season_rounds.length > 0 && ( )}
) }