Skip to content

Commit f6450e1

Browse files
committed
Use analytics from context
Signed-off-by: Olga Bulat <obulat@gmail.com>
1 parent 02c57f7 commit f6450e1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

frontend/src/components/VMediaInfo/VMediaTags.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ import { useSearchStore } from "~/stores/search"
6161
6262
import { focusElement } from "~/utils/focus-management"
6363
64-
import { useAnalytics } from "~/composables/use-analytics"
65-
6664
import VMediaTag from "~/components/VMediaTag/VMediaTag.vue"
6765
import VTag from "~/components/VTag/VTag.vue"
6866
import VButton from "~/components/VButton.vue"
@@ -89,7 +87,7 @@ export default defineComponent({
8987
9088
const searchStore = useSearchStore()
9189
const featureFlagStore = useFeatureFlagStore()
92-
const { app } = useContext()
90+
const { app, $sendCustomEvent } = useContext()
9391
9492
const additionalSearchViews = computed(() =>
9593
featureFlagStore.isOn("additional_search_views")
@@ -162,15 +160,14 @@ export default defineComponent({
162160
}
163161
})
164162
165-
const { sendCustomEvent } = useAnalytics()
166163
const buttonStatus = ref<"show" | "hide">("show")
167164
/**
168165
* Toggles the text for the "Show more" button. When showing more tags, we also
169166
* focus the first tag in the newly-opened row for a11y.
170167
*/
171168
const handleClick = () => {
172169
buttonStatus.value = buttonStatus.value === "show" ? "hide" : "show"
173-
sendCustomEvent("TOGGLE_TAG_EXPANSION", {
170+
$sendCustomEvent("TOGGLE_TAG_EXPANSION", {
174171
toState: buttonStatus.value === "show" ? "collapsed" : "expanded",
175172
})
176173
if (buttonStatus.value === "hide" && collapsibleRowsStartAt.value) {

0 commit comments

Comments
 (0)