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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user