feat: Add translation on 3 languages for sight page

This commit is contained in:
2025-06-01 00:34:59 +03:00
parent 0d9bbb140f
commit 87386c6a73
22 changed files with 768 additions and 732 deletions

View File

@@ -1,4 +1,4 @@
import { articlesStore, authStore, Language } from "@shared";
import { articlesStore } from "@shared";
import { observer } from "mobx-react-lite";
import { useEffect, useState } from "react";
import {
@@ -73,7 +73,10 @@ export const SelectArticleModal = observer(
setIsLoading(true);
try {
await Promise.all([getArticle(articleId), getArticleMedia(articleId)]);
await Promise.all([
getArticle(Number(articleId)),
getArticleMedia(Number(articleId)),
]);
} catch (error) {
console.error("Failed to fetch article data:", error);
// Reset article data on error
@@ -83,9 +86,11 @@ export const SelectArticleModal = observer(
setIsLoading(false);
}
};
// @ts-ignore
const filteredArticles = articles
// @ts-ignore
.filter((article) => !linkedArticleIds.includes(article.id))
// @ts-ignore
.filter((article) =>
article.service_name.toLowerCase().includes(searchQuery.toLowerCase())
);
@@ -140,6 +145,7 @@ export const SelectArticleModal = observer(
{searchQuery ? "Статьи не найдены" : "Нет доступных статей"}
</Typography>
) : (
// @ts-ignore
filteredArticles.map((article) => (
<ListItemButton
key={article.id}