This commit is contained in:
2025-06-24 14:14:40 +02:00
parent a000f966eb
commit 7cc292296b
8 changed files with 171 additions and 115 deletions

View File

@ -5,7 +5,7 @@
<p class="text-lg xl:text-2xl font-extrabold text-black dark:text-white">
{{ mainCategoryName }}
</p>
<span :class="['flex items-center justify-center',isOpen && 'rotate-180', 'transition-all']"><i
<span :class="['flex items-center justify-center', isOpen && 'rotate-180', 'transition-all']"><i
class="iconify i-lucide:chevron-down text-button shrink-0 size-6 ms-auto"></i></span>
</div>
</div>
@ -40,7 +40,7 @@ const toggle = () => {
};
// Computed properties
const hasMainCategory = computed(() => props.data.length > 0 && props.data[0].langs && props.data[0].langs.length > 0);
const hasMainCategory = computed(() => props.data && props.data.length > 0 && props.data[0].langs && props.data[0].langs.length > 0);
const mainCategoryName = computed(() => hasMainCategory.value ? props.data[0].langs[0].Name : '');
const subcategories = computed(() => hasMainCategory.value && props.data[0].children ? props.data[0].children : []);
</script>