From 1eeec4d22cab79810379fba4ae2c0c43960e2495 Mon Sep 17 00:00:00 2001 From: supalerk-ar66 Date: Tue, 10 Feb 2026 10:21:17 +0700 Subject: [PATCH] feat: Add CategorySidebar component to filter courses by category with show more/less functionality. --- .../components/discovery/CategorySidebar.vue | 181 ++++++++++++------ 1 file changed, 126 insertions(+), 55 deletions(-) diff --git a/Frontend-Learner/components/discovery/CategorySidebar.vue b/Frontend-Learner/components/discovery/CategorySidebar.vue index 3acdb932..c5a31f3b 100644 --- a/Frontend-Learner/components/discovery/CategorySidebar.vue +++ b/Frontend-Learner/components/discovery/CategorySidebar.vue @@ -10,69 +10,140 @@ const props = defineProps<{ }>(); const emit = defineEmits<{ - (e: 'update:modelValue', value: number[]): void; + (e: "update:modelValue", value: number[]): void; }>(); const showAllCategories = ref(false); const getLocalizedText = (text: any) => { - if (!text) return '' - if (typeof text === 'string') return text - return text.th || text.en || '' -} + if (!text) return ""; + if (typeof text === "string") return text; + return text.th || text.en || ""; +}; + +