diff --git a/src/components/Score.vue b/src/components/Score.vue index 40fd460..e0cfb37 100644 --- a/src/components/Score.vue +++ b/src/components/Score.vue @@ -58,8 +58,10 @@ function formatScore(score) { }; }); } - -const title = score ? score.title : ""; +function getTranslation(translations, key) { + return translations.find((translation) => translation[key] == store.language); +} +const title = score ? getTranslation(score.translations, "languages_id").title : ""; const questions = ref(formatScore(score)); const scoreSum = computed(() => {