mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix(useLocale): unique symbol to use in @nuxt/ui-pro (#3603)
This commit is contained in:
@@ -5,7 +5,7 @@ import type { Locale, Messages } from '../types/locale'
|
||||
import { buildLocaleContext } from '../utils/locale'
|
||||
import en from '../locale/en'
|
||||
|
||||
export const localeContextInjectionKey: InjectionKey<Ref<Locale<unknown> | undefined>> = Symbol('nuxt-ui.locale-context')
|
||||
export const localeContextInjectionKey: InjectionKey<Ref<Locale<unknown> | undefined>> = Symbol.for('nuxt-ui.locale-context')
|
||||
|
||||
const _useLocale = (localeOverrides?: Ref<Locale<Messages> | undefined>) => {
|
||||
const locale = localeOverrides || toRef(inject<Locale<Messages>>(localeContextInjectionKey))
|
||||
|
||||
Reference in New Issue
Block a user