diff --git a/src/ui/flights/FlightList.tsx b/src/ui/flights/FlightList.tsx index 4250ed04..d4a7a2b5 100644 --- a/src/ui/flights/FlightList.tsx +++ b/src/ui/flights/FlightList.tsx @@ -40,6 +40,11 @@ export interface FlightListProps { * Купить / Онлайн регистрация alongside Детали рейса. */ renderActions?: (flight: ISimpleFlight) => ReactNode; + /** + * Aeroflot booking URL per flight for the hover-reveal inline + * "Купить билет" link (TIRREDESIGN-6). Return null to hide. + */ + buyUrlFor?: (flight: ISimpleFlight) => string | null; } /** @@ -57,6 +62,7 @@ export const FlightList: FC = ({ direction = "route", renderExpandedBody, renderActions, + buyUrlFor, }) => { const { t } = useTranslation(); const cardRefs = useRef>(new Map()); @@ -110,16 +116,29 @@ export const FlightList: FC = ({ onFlightClick(flight) } + ? { + onViewDetails: () => onFlightClick(flight), + // When expandable is off we need a row-level onClick to + // trigger navigation — rowClickable in FlightCard depends + // on `expandable || Boolean(onClick)`. + ...(direction === "schedule" + ? { onClick: () => onFlightClick(flight) } + : {}), + } : {})} {...(renderExpandedBody ? { renderExpandedBody } : {})} {...(renderActions ? { renderActions } : {})} + {...(() => { + const url = buyUrlFor?.(flight); + return url ? { inlineBuyUrl: url } : {}; + })()} /> ))}