Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 1m7s
19 lines
570 B
Vue
19 lines
570 B
Vue
<script setup lang="ts">
|
|
const config = useContentConfig()
|
|
const {preferLocale} = useContentPreference()
|
|
const {locale, path} = useContentInjected()
|
|
|
|
const locales = config.locale?.list ?? []
|
|
const candidates = computed(() => locales.filter(l => l.code !== locale.value))
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtLink
|
|
v-for="candidate in candidates"
|
|
:key="candidate.code"
|
|
:to="{ path: path(undefined, {locale: candidate.code}).value, query: { freeze: 'true' }}"
|
|
@click="preferLocale(candidate.code)">
|
|
{{ candidate.code.toUpperCase() }}
|
|
</NuxtLink>
|
|
</template>
|