diff --git a/src/components/ContributionCalendar.jsx b/src/components/ContributionCalendar.jsx index 5f63b96..74bb133 100644 --- a/src/components/ContributionCalendar.jsx +++ b/src/components/ContributionCalendar.jsx @@ -95,25 +95,6 @@ export default function ContributionCalendar({ data }) { const visibleDays = days.slice(startWeek * 7, 52 * 7); const visibleMonthLabels = monthLabels.filter(l => l.week >= startWeek); - // Scroll indicator for mobile - const [showScrollHint, setShowScrollHint] = useState(false); - const calendarRef = React.useRef(null); - useEffect(() => { - if (!isMobile) return; - const el = calendarRef.current; - if (!el) return; - const checkScroll = () => { - setShowScrollHint(el.scrollWidth > el.clientWidth && el.scrollLeft < 16); - }; - checkScroll(); - el.addEventListener('scroll', checkScroll); - window.addEventListener('resize', checkScroll); - return () => { - el.removeEventListener('scroll', checkScroll); - window.removeEventListener('resize', checkScroll); - }; - }, [isMobile, expanded]); - // When expanding to full year on mobile, scroll to the right (most recent weeks) useEffect(() => { if (!isMobile) return; @@ -130,6 +111,8 @@ export default function ContributionCalendar({ data }) { // Get max count for scaling (optional, for more dynamic color) // const max = Math.max(...Object.values(data)); + const calendarRef = React.useRef(null); + return (
- {/* Scroll indicator for mobile */} - {isMobile && showScrollHint && ( -
- ⬅️➡️ Scroll -
- )} {/* Month labels */}