Update ContributionCalendar to adjust weeks displayed based on mobile view

- Modified the logic for determining the number of weeks to show in the ContributionCalendar component, reducing the count from 20 to 19 when in mobile view and not expanded.
- This change aims to optimize the calendar display for better usability on smaller screens.
This commit is contained in:
2025-06-15 16:43:22 +02:00
parent 6d9ae02f2a
commit e127115f41

View File

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