diff --git a/components/BlogCard.vue b/components/BlogCard.vue index 2ddbcd920..4750f3072 100644 --- a/components/BlogCard.vue +++ b/components/BlogCard.vue @@ -37,7 +37,7 @@ [], }, currentTag: { type: String, required: false, + default: "", }, currentLang: { type: String, @@ -101,6 +105,12 @@ function formatDate(date: string) { }); } +const prefixLinkToTag = computed(() => { + if (!props.currentTag) return ""; + if (props.currentLang === "en") return `/blog?tag=${props.currentTag}`; + return `/${props.currentLang}/blog?tag=${props.currentTag}`; +}); + const isDisplayed = computed(() => { const tagsIncludeCurrentTag = !props.currentTag || props.tags?.includes(props.currentTag);