feat: Add translation on 3 languages for sight page
This commit is contained in:
@@ -53,7 +53,7 @@ class ArticlesStore {
|
||||
const response = await authInstance.get(`/sight/${id}/article`);
|
||||
|
||||
runInAction(() => {
|
||||
editSightStore.sightInfo[languageStore.language].right = response.data;
|
||||
editSightStore.sight[languageStore.language].right = response.data;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -66,10 +66,14 @@ class ArticlesStore {
|
||||
};
|
||||
|
||||
getArticleByArticleId = computed(() => {
|
||||
if (editSightStore.sightInfo.left_article) {
|
||||
return this.articles[languageStore.language].find(
|
||||
(a) => a.id == editSightStore.sightInfo.left_article
|
||||
if (editSightStore.sight.common.left_article) {
|
||||
const language = languageStore.language;
|
||||
const foundArticle = this.articles[language].find(
|
||||
(a) => a.id == editSightStore.sight.common.left_article
|
||||
);
|
||||
editSightStore.sight[language].left.heading = foundArticle?.heading ?? "";
|
||||
editSightStore.sight[language].left.body = foundArticle?.body ?? "";
|
||||
return foundArticle;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user