diff --git a/src/modules/contacts/components/opened-contact-communications.vue b/src/modules/contacts/components/opened-contact-communications.vue index 73ac50a2..7bbf2638 100644 --- a/src/modules/contacts/components/opened-contact-communications.vue +++ b/src/modules/contacts/components/opened-contact-communications.vue @@ -69,21 +69,12 @@ const tabs = computed(() => [ }, ]); -const currentTab = ref({}); +const currentTab = computed(() => tabs.value.find(({ pathName }) => pathName === route.name)) function changeTab(tab) { - currentTab.value = tab; return router.push({ name: tab.pathName }); } -function initializeCommunicationsTab() { - currentTab.value = tabs.value.find(({ pathName }) => pathName === route.name) -} - -onMounted(() => { - initializeCommunicationsTab(); -}); -