Breadcrumbs: use BOARD.TITLE, drop flight-number leaf
Angular's details breadcrumb trail is just 'Главная / Онлайн-Табло' (BOARD.TITLE with capital Т) — the flight number itself is NOT a breadcrumb entry. React was using the lowercase 'Онлайн-табло' translation and appending 'SU 6272'. Align both the leaf text and the list depth with Angular.
This commit is contained in:
@@ -461,11 +461,12 @@ export const OnlineBoardDetailsPage: FC<OnlineBoardDetailsPageProps> = ({
|
||||
);
|
||||
|
||||
const onlineboardHref = `/${locale}/onlineboard`;
|
||||
// Angular uses the 'Онлайн-Табло' title (BOARD.TITLE) as the sole
|
||||
// breadcrumb leaf — the flight number itself is NOT a breadcrumb entry.
|
||||
const rootBreadcrumbLabel = t("BOARD.TITLE");
|
||||
const commonLayoutProps = {
|
||||
headerLeft: <DetailsBackButton locale={locale} />,
|
||||
breadcrumbs: [
|
||||
{ label: t("BREADCRUMBS.ONLINEBOARD"), url: onlineboardHref },
|
||||
],
|
||||
breadcrumbs: [{ label: rootBreadcrumbLabel, url: onlineboardHref }],
|
||||
};
|
||||
|
||||
if (loading) {
|
||||
@@ -516,10 +517,7 @@ export const OnlineBoardDetailsPage: FC<OnlineBoardDetailsPageProps> = ({
|
||||
<PageLayout
|
||||
headerLeft={<DetailsBackButton locale={locale} />}
|
||||
title={<h1 className="flight-details__flight-number">{pageTitle}</h1>}
|
||||
breadcrumbs={[
|
||||
{ label: t("BREADCRUMBS.ONLINEBOARD"), url: onlineboardHref },
|
||||
{ label: flightNumber },
|
||||
]}
|
||||
breadcrumbs={[{ label: rootBreadcrumbLabel, url: onlineboardHref }]}
|
||||
contentLeft={
|
||||
<FlightsMiniList
|
||||
flights={miniListFlights}
|
||||
|
||||
Reference in New Issue
Block a user