Skip to content

Commit

Permalink
fix: clean up #173 (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samathingamajig authored Mar 17, 2024
1 parent 791a42b commit afa634f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/components/calendar/CalendarGrid/CalendarGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface Props {
setCourse: React.Dispatch<React.SetStateAction<Course | null>>;
}

function CalendarHour(hour: number) {
function CalendarHour({ hour }: { hour: number }) {
return (
<div className='grid-row-span-2 pr-2'>
<Text variant='small' className='inline-block w-full text-right -translate-y-2.25'>
Expand All @@ -31,7 +31,7 @@ function makeGridRow(row: number, cols: number): JSX.Element {

return (
<>
{CalendarHour(hour)}
<CalendarHour hour={hour} />
<div className='grid-row-span-2 w-4 border-b border-r border-gray-300' />
{[...Array(cols).keys()].map(col => (
<CalendarCell key={`${row}${col}`} row={row} col={col} />
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function CalendarGrid({
</div>
))}
{[...Array(13).keys()].map(i => makeGridRow(i, 5))}
{CalendarHour(21)}
<CalendarHour hour={21} />
{Array(6)
.fill(1)
.map(() => (
Expand Down Expand Up @@ -130,7 +130,7 @@ function AccountForCourseConflicts({ courseCells, setCourse }: AccountForCourseC
<div
key={`${JSON.stringify(block)}`}
style={{
gridColumn: `${block.calendarGridPoint.dayIndex + 2}`,
gridColumn: `${block.calendarGridPoint.dayIndex + 3}`,
gridRow: `${block.calendarGridPoint.startIndex} / ${block.calendarGridPoint.endIndex}`,
width: `calc(100% / ${block.totalColumns})`,
marginLeft: `calc(100% * ${(block.gridColumnStart - 1) / block.totalColumns})`,
Expand Down

0 comments on commit afa634f

Please sign in to comment.