plan/react-rewrite #1

Merged
gnezim merged 138 commits from plan/react-rewrite into main 2026-04-15 12:21:16 +03:00
3 changed files with 42 additions and 0 deletions
Showing only changes of commit b6da51fce5 - Show all commits
+3
View File
@@ -371,6 +371,9 @@
"IFLY_BODY" : "SU5800SU5949 Aeroflot flights are operated by iFly aircraft and crew.",
"IFLY_INFO" : "Information on the on-board service is available <a target=\"_blank\" href=\"https://www.aeroflot.ru/ru-en/aeroflot-ifly\">here</a>."
},
"SMOKE": {
"HEADING": "Smoke test page"
},
"FLIGHTS-MAP": {
"TITLE": "Route map",
"ROUTE": "Find your route",
+3
View File
@@ -365,6 +365,9 @@
"WEEK": "Неделя",
"WEEK_FORMAT-WRONG": "Не соответствует формату ДД.ММ.ГГГГ - ДД.ММ.ГГГГ"
},
"SMOKE": {
"HEADING": "Страница проверки"
},
"WARNING":{
"IFLY_HIGHLIGHT" : "Обратите внимание!",
"IFLY_BODY" : "Рейсы Аэрофлота с нумерацией SU5800-SU5949 выполняются на самолётах и экипажем авиакомпании iFly.",
+36
View File
@@ -0,0 +1,36 @@
import { useEffect } from "react";
import { useParams } from "@modern-js/runtime/router";
import { useTranslation } from "@/i18n/provider";
import { useLogger } from "@/observability/logger/provider";
/**
* Smoke route at /{lang}/smoke.
* Exercises the foundation subsystems as a quick integration check:
* - Logger: emits an info log on mount
* - i18n: renders a translated string (SMOKE.HEADING)
* - Locale display: shows the current lang param
*/
export default function SmokePage(): JSX.Element {
const { lang } = useParams<{ lang: string }>();
const { t } = useTranslation();
const logger = useLogger();
useEffect(() => {
logger.info("Smoke page mounted", { locale: lang ?? "unknown" });
}, [logger, lang]);
return (
<main style={{ padding: "2rem" }}>
<h1>{t("SMOKE.HEADING")}</h1>
<dl>
<dt>Locale</dt>
<dd>{lang}</dd>
<dt>i18n test (BOARD.DEPARTURE)</dt>
<dd>{t("BOARD.DEPARTURE")}</dd>
</dl>
<p>
If you can see translated text above, the i18n provider is working.
</p>
</main>
);
}