From 303c52653c98b191ebf674ade7f828a0dc995cd9 Mon Sep 17 00:00:00 2001 From: "diana.dolgolyova" Date: Tue, 10 Mar 2026 19:10:58 +0300 Subject: [PATCH] feat: tap-to-filter on mobile schedule, replace filter bar On mobile, tapping a trainer name or class type in the agenda list filters to show all their sessions across the week. Active filter shown as a banner with clear button. Desktop filters unchanged. Co-Authored-By: Claude Opus 4.6 --- src/components/sections/Schedule.tsx | 51 +++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/src/components/sections/Schedule.tsx b/src/components/sections/Schedule.tsx index 19e531d..ae6979c 100644 --- a/src/components/sections/Schedule.tsx +++ b/src/components/sections/Schedule.tsx @@ -169,9 +169,9 @@ export function Schedule() { - {/* Compact filters — scrollable on mobile */} + {/* Compact filters — desktop only */} -
+
{/* Class types */} {types.map((type) => (
- {/* Mobile: compact agenda list */} + {/* Mobile: compact agenda list with tap-to-filter */}
+ {/* Active filter indicator */} + {hasActiveFilter && ( +
+
+ {filterTrainer && ( + + + {filterTrainer} + + )} + {filterType && ( + + + {filterType} + + )} +
+ +
+ )} + {filteredDays.length > 0 ? (
{filteredDays.map((day) => ( @@ -280,12 +307,15 @@ export function Schedule() { {cls.time} - {/* Info */} + {/* Info — tappable trainer & type */}
- + {cls.hasSlots && ( места @@ -302,10 +332,13 @@ export function Schedule() { )}
-
+
+ {cls.type} +
))}