From 1b4cd7c0595e5bf1c12abf831636eccbfc92fc84 Mon Sep 17 00:00:00 2001 From: Ana Alves Date: Sat, 27 Dec 2025 15:33:43 +0000 Subject: [PATCH 1/2] Improved class filters visibility --- src/components/planner/ScheduleType.tsx | 72 ++++++++++++++----------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/src/components/planner/ScheduleType.tsx b/src/components/planner/ScheduleType.tsx index 4bdd145cd..f28239b13 100644 --- a/src/components/planner/ScheduleType.tsx +++ b/src/components/planner/ScheduleType.tsx @@ -1,4 +1,5 @@ -import { getClassType } from '../../utils' +import { getClassType, cn } from '../../utils' +import { Badge } from '../ui/badge' type Props = { types: string[], @@ -7,40 +8,49 @@ type Props = { } const ScheduleTypes = ({ types, hiddenLessonsTypes, setHiddenLessonsTypes }: Props) => { + const toggleType = (lessonType: string) => { + if (hiddenLessonsTypes.includes(lessonType)) { + setHiddenLessonsTypes(hiddenLessonsTypes.filter(t => t !== lessonType)) + } else { + setHiddenLessonsTypes([...hiddenLessonsTypes, lessonType]) + } + } return ( <> - {types.map((lessonType) => ( -