From f73b975c651681d8570380c971315e4cedfaca7f Mon Sep 17 00:00:00 2001 From: MateuszMichalowski <79852198+MateuszMichalowski@users.noreply.github.com> Date: Fri, 9 Aug 2024 09:41:17 +0200 Subject: [PATCH] fix(frontend): fix how community switch is handled (#3350) --- frontend/src/components/CommunitySwitch.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/CommunitySwitch.vue b/frontend/src/components/CommunitySwitch.vue index b8850ac75..b076c558a 100644 --- a/frontend/src/components/CommunitySwitch.vue +++ b/frontend/src/components/CommunitySwitch.vue @@ -113,9 +113,9 @@ const { toastError } = useAppToast() const communities = ref([]) const validCommunityIdentifier = ref(false) -const { result } = useQuery(selectCommunities) +const { result, onResult } = useQuery(selectCommunities) -watch(result, (data) => { +onResult(({ data }) => { if (data) { communities.value = data.communities setDefaultCommunity() @@ -125,7 +125,7 @@ watch(result, (data) => { const communityIdentifier = computed(() => route.params.communityIdentifier) function updateCommunity(community) { - emit('update:modelValue', community) + emit('update:model-value', community) } function setDefaultCommunity() {