This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/components/LocaleLink.vue

18 lines
357 B
Vue

<template>
<nuxt-link v-if="locale === config.locale" :to="link">
<slot></slot>
</nuxt-link>
<a v-else :href="locales[locale].url + link">
<slot></slot>
</a>
</template>
<script>
export default {
props: {
link: { required: true },
locale: { required: true },
},
};
</script>