From a67315e05d82359f949138c934560aac7074f9e9 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Mon, 19 May 2025 14:50:44 +0200 Subject: [PATCH] feat(frontend): Discussions sidebar volgt taal --- frontend/src/components/DiscussionsSideBar.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/DiscussionsSideBar.vue b/frontend/src/components/DiscussionsSideBar.vue index a93729f6..cecc9426 100644 --- a/frontend/src/components/DiscussionsSideBar.vue +++ b/frontend/src/components/DiscussionsSideBar.vue @@ -4,13 +4,18 @@ import DiscussionSideBarElement from "@/components/DiscussionSideBarElement.vue"; import { useI18n } from "vue-i18n"; import { useGetAllLearningPaths } from "@/queries/learning-paths.ts"; - import { ref } from "vue"; + import { ref, watch } from 'vue'; const { t, locale } = useI18n(); const navigationDrawerShown = ref(true); + const currentLocale = ref(locale.value); - const allLearningPathsResult = useGetAllLearningPaths(locale.value); + watch(locale, (newLocale) => { + currentLocale.value = newLocale; + }) + + const allLearningPathsResult = useGetAllLearningPaths(() => currentLocale.value);