Skip to content

Commit c9bfc4e

Browse files
authored
fix: analytics.js using old i18n impl (#5132)
* fix i18n * fix: lint
1 parent 1ea96df commit c9bfc4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/frontend/src/utils/analytics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { injectI18n } from '@modrinth/ui'
12
import dayjs from 'dayjs'
23
import { computed, ref, watch } from 'vue'
34

@@ -7,8 +8,7 @@ import { computed, ref, watch } from 'vue'
78
const { unix } = dayjs
89

910
export function useCountryNames(style = 'long') {
10-
const { $i18n } = useNuxtApp()
11-
const locale = $i18n.locale
11+
const { locale } = injectI18n()
1212
const displayNames = computed(
1313
() => new Intl.DisplayNames([locale.value], { type: 'region', style }),
1414
)

0 commit comments

Comments
 (0)