Adjust weeks displayed in ContributionCalendar for mobile view optimization

- Reduced the number of weeks shown in the ContributionCalendar component from 19 to 18 when in mobile view and not expanded.
- This change aims to further enhance the usability of the calendar on smaller screens.
This commit is contained in:
2025-06-15 16:44:08 +02:00
parent e127115f41
commit 290505f96e

View File

@@ -97,7 +97,7 @@ export default function ContributionCalendar({ data }) {
}, []);
// Determine how many weeks to show
const weeksToShow = isMobile && !expanded ? 19 : 52;
const weeksToShow = isMobile && !expanded ? 18 : 52;
const startWeek = 52 - weeksToShow;
const visibleDays = days.slice(startWeek * 7, 52 * 7);
const visibleMonthLabels = monthLabels.filter(l => l.week >= startWeek);