diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsx index 1b9392e7d8..29a66fe62a 100644 --- a/pages/[user]/[type].tsx +++ b/pages/[user]/[type].tsx @@ -67,11 +67,21 @@ export default function Type(props) { days.push(i); } - const calendar = days.map((day) => + + // Create placeholder elements for empty days in first week + const weekdayOfFirst = dayjs().month(selectedMonth).date(1).day(); + const emptyDays = Array(weekdayOfFirst).fill(null).map((day, i) => +
+ {null} +
+ ); + + // Combine placeholder days with actual days + const calendar = [...emptyDays, ...days.map((day) => - ); + )]; // Handle date change useEffect(async () => { @@ -132,7 +142,7 @@ export default function Type(props) {
-
+
{props.user.avatar && Avatar}

{props.user.name}