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 {
display: flex;
flex-direction: column;
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(13, 1fr);
grid-gap: 8px;
}
.calendarRow {

View File

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