Render FlightSchedule (weekly days strip) on Schedule details direct flights (Angular parity)
This commit is contained in:
@@ -23,6 +23,7 @@ import { useScheduleDetails } from "../hooks/useScheduleDetails.js";
|
||||
import { buildScheduleDetailsSeo } from "../seo.js";
|
||||
import { buildScheduleFlightJsonLd } from "../json-ld.js";
|
||||
import { ScheduleFlightBody } from "./ScheduleFlightBody.js";
|
||||
import { FlightSchedule } from "@/features/online-board/components/FlightSchedule/index.js";
|
||||
import type { IScheduleFlightId, IFlightLeg, ISimpleFlight } from "../types.js";
|
||||
import "./ScheduleDetailsPage.scss";
|
||||
|
||||
@@ -219,6 +220,14 @@ export const ScheduleDetailsPage: FC<ScheduleDetailsPageProps> = ({
|
||||
{/* Collapsed summary row, then the rich per-leg body. */}
|
||||
<FlightCard flight={flight} direction="schedule" />
|
||||
{renderBody(flight)}
|
||||
|
||||
{/* Angular's flight-schedule-details renders the weekly
|
||||
operating schedule below the leg body for direct
|
||||
flights. Skip it for multi-leg chains (Angular also
|
||||
hides it there). */}
|
||||
{flight.routeType === "Direct" && (
|
||||
<FlightSchedule flight={flight as unknown as ISimpleFlight} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user