THE CUBES HAVE LISTENED TO ME

This commit is contained in:
2024-02-05 22:02:29 -06:00
parent d1720f3356
commit 3d95d03813
2 changed files with 11 additions and 16 deletions

View File

@@ -15,8 +15,10 @@
} }
.calendarGrid { .calendarGrid {
display: flex; display: grid;
flex-direction: column; grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(13, 1fr);
grid-gap: 8px;
} }
.calendarRow { .calendarRow {

View File

@@ -7,8 +7,8 @@ const daysOfWeek = Object.values(DAY_MAP);
daysOfWeek.pop(); daysOfWeek.pop();
daysOfWeek.pop(); daysOfWeek.pop();
const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8);
const grid = Array.from({ length: 13 }, () => const grid = Array.from({ length: 5 }, () =>
Array.from({ length: 5 }, (_, columnIndex) => ( Array.from({ length: 13 }, (_, columnIndex) => (
<CalendarCell key={columnIndex} /> <CalendarCell key={columnIndex} />
)) ))
); );
@@ -31,21 +31,14 @@ const Calendar: React.FC = (props) => {
))} ))}
</div> </div>
{/* Displaying the rest of the calendar */} {/* Displaying the rest of the calendar */}
{/* <div className={styles.calendarGrid}> <div className={styles.calendarGrid}>
{hoursOfDay.map(hour => ( {grid.map((row, rowIndex) => (
<div key={hour} className={styles.calendarRow}> <div className={styles.row} key={rowIndex}>
{daysOfWeek.map(day => ( {row}
<CalendarCell key={`${day}-${hour}`} />
))}
</div> </div>
))} ))}
</div> */} </div>
{grid.map((row, rowIndex) => (
<div className={styles.row} key={rowIndex}>
{row}
</div>
))}
</div> </div>
) )
}; };