diff --git a/src/ui/flights/FlightCard.scss b/src/ui/flights/FlightCard.scss index 33508136..a7a0f27a 100644 --- a/src/ui/flights/FlightCard.scss +++ b/src/ui/flights/FlightCard.scss @@ -199,6 +199,21 @@ } } + &__buy-btn { + background: #ff9000; + color: #fff; + border: none; + border-radius: 4px; + padding: 10px 24px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + text-decoration: none; + transition: background-color 150ms ease; + + &:hover { background: #e68200; } + } + &__details-btn { background: colors.$blue; color: #fff; diff --git a/src/ui/flights/FlightCard.tsx b/src/ui/flights/FlightCard.tsx index 6b41b5be..9251f85e 100644 --- a/src/ui/flights/FlightCard.tsx +++ b/src/ui/flights/FlightCard.tsx @@ -96,6 +96,7 @@ export const FlightCard: FC = ({ const flightNumber = `${flight.flightId.carrier} ${flight.flightId.flightNumber}`; const carrier = operatingCarrier(flight.operatingBy) ?? flight.flightId.carrier; + const isMultiLeg = flight.routeType === "MultiLeg"; const aircraftName = departureLeg.equipment?.aircraft?.actual?.title ?? departureLeg.equipment?.aircraft?.scheduled?.title ?? @@ -171,7 +172,15 @@ export const FlightCard: FC = ({
- + {isMultiLeg + ? flight.legs.map((leg, i) => ( + + )) + : }
@@ -335,6 +344,18 @@ export const FlightCard: FC = ({ > + {direction === "schedule" && ( + e.stopPropagation()} + > + {t("SHARED.BUY-TICKET") || "Купить"} + + )}