fix: Fix Map page

This commit is contained in:
2025-06-12 22:50:43 +03:00
parent 27cb644242
commit 300ff262ce
41 changed files with 2216 additions and 1055 deletions

View File

@ -15,11 +15,16 @@ export const CountryPreviewPage = observer(() => {
useEffect(() => {
(async () => {
if (id) {
const data = await getCountry(id as string, language);
setEditCountryData(data.name, language);
const ruData = await getCountry(id as string, "ru");
const enData = await getCountry(id as string, "en");
const zhData = await getCountry(id as string, "zh");
setEditCountryData(ruData.name, "ru");
setEditCountryData(enData.name, "en");
setEditCountryData(zhData.name, "zh");
}
})();
}, [id, language]);
}, [id]);
return (
<Paper className="w-full h-full p-3 flex flex-col gap-10">
@ -55,7 +60,7 @@ export const CountryPreviewPage = observer(() => {
<div className="flex flex-col gap-10 w-full">
<div className="flex flex-col gap-2">
<h1 className="text-lg font-bold">Название</h1>
<p>{country[id!]?.[language]?.name}</p>
<p>{country[id!]?.ru?.name}</p>
</div>
</div>
)}