From f6450e18b2423ba4d653ce2548018e15d284790f Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Mon, 18 Mar 2024 18:00:24 +0300 Subject: [PATCH] Use analytics from context Signed-off-by: Olga Bulat --- frontend/src/components/VMediaInfo/VMediaTags.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/VMediaInfo/VMediaTags.vue b/frontend/src/components/VMediaInfo/VMediaTags.vue index 644c4e47036..b69931ea461 100644 --- a/frontend/src/components/VMediaInfo/VMediaTags.vue +++ b/frontend/src/components/VMediaInfo/VMediaTags.vue @@ -61,8 +61,6 @@ import { useSearchStore } from "~/stores/search" import { focusElement } from "~/utils/focus-management" -import { useAnalytics } from "~/composables/use-analytics" - import VMediaTag from "~/components/VMediaTag/VMediaTag.vue" import VTag from "~/components/VTag/VTag.vue" import VButton from "~/components/VButton.vue" @@ -89,7 +87,7 @@ export default defineComponent({ const searchStore = useSearchStore() const featureFlagStore = useFeatureFlagStore() - const { app } = useContext() + const { app, $sendCustomEvent } = useContext() const additionalSearchViews = computed(() => featureFlagStore.isOn("additional_search_views") @@ -162,7 +160,6 @@ export default defineComponent({ } }) - const { sendCustomEvent } = useAnalytics() const buttonStatus = ref<"show" | "hide">("show") /** * Toggles the text for the "Show more" button. When showing more tags, we also @@ -170,7 +167,7 @@ export default defineComponent({ */ const handleClick = () => { buttonStatus.value = buttonStatus.value === "show" ? "hide" : "show" - sendCustomEvent("TOGGLE_TAG_EXPANSION", { + $sendCustomEvent("TOGGLE_TAG_EXPANSION", { toState: buttonStatus.value === "show" ? "collapsed" : "expanded", }) if (buttonStatus.value === "hide" && collapsibleRowsStartAt.value) {