From 01cf1cfe9a46bdea8dfbd005bb80c40661b491d2 Mon Sep 17 00:00:00 2001 From: caadiq Date: Mon, 1 Jun 2026 15:04:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(mobile-schedule):=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=EC=B9=A9=20=EC=9E=90=EB=8F=99=20=EC=88=A8?= =?UTF-8?q?=EA=B9=80=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 스크롤 방향 감지 자동 숨김이 sticky 바의 transform 전환과 충돌해 리스트 상단에서 위로 스크롤 시 떨림 발생. 항상 보이는 단순 sticky 칩 바로 변경. Co-Authored-By: Claude Opus 4.7 --- .../src/pages/mobile/schedule/Schedule.jsx | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/frontend/src/pages/mobile/schedule/Schedule.jsx b/frontend/src/pages/mobile/schedule/Schedule.jsx index 5615c63..177b287 100644 --- a/frontend/src/pages/mobile/schedule/Schedule.jsx +++ b/frontend/src/pages/mobile/schedule/Schedule.jsx @@ -381,24 +381,6 @@ function MobileSchedule() { return schedules.filter((s) => selectedCategories.includes(s.category_id)); }, [schedules, selectedCategories]); - // 카테고리 칩 자동 숨김 (스크롤 방향 감지: 내리면 숨김, 올리면 보임) - const [chipsVisible, setChipsVisible] = useState(true); - const lastScrollYRef = useRef(0); - useEffect(() => { - const container = document.querySelector('.mobile-content'); - if (!container) return; - const onScroll = () => { - const y = container.scrollTop; - const last = lastScrollYRef.current; - if (y < 16) setChipsVisible(true); - else if (y > last + 6) setChipsVisible(false); - else if (y < last - 6) setChipsVisible(true); - lastScrollYRef.current = y; - }; - container.addEventListener('scroll', onScroll, { passive: true }); - return () => container.removeEventListener('scroll', onScroll); - }, []); - // 요일 이름 const getDayName = (date) => ['일', '월', '화', '수', '목', '금', '토'][date.getDay()]; @@ -829,10 +811,7 @@ function MobileSchedule() { <> {/* 카테고리 필터 칩 (스크롤 방향 감지 자동 숨김) */} {monthCategories.length > 0 && ( -
+