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 || ""; +}; - - + + + - - - - emit('update:modelValue', val)" - :val="cat.id" - color="primary" - dense - class="checkbox-visible" - /> - - - {{ getLocalizedText(cat.name) }} - - + + emit('update:modelValue', val)" + :val="cat.id" + color="primary" + dense + class="checkbox-visible" + /> + + + + {{ getLocalizedText(cat.name) }} + + + - - - - - {{ showAllCategories ? 'แสดงน้อยลง' : 'แสดงเพิ่มเติม' }} - - - - - - - - - + + + + + {{ showAllCategories ? "แสดงน้อยลง" : "แสดงเพิ่มเติม" }} + + + + + + + + + + +