mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
pre codemon
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
"use client";
|
||||
import { useLocalCourseDetailsQuery } from "@/hooks/localCoursesHooks";
|
||||
import { getDateFromStringOrThrow } from "@/models/local/timeUtils";
|
||||
import { getMonthsBetweenDates } from "./calendarMonthUtils";
|
||||
import { CalendarMonth } from "./CalendarMonth";
|
||||
|
||||
export default function Page({
|
||||
params: { courseName },
|
||||
@@ -8,18 +10,17 @@ export default function Page({
|
||||
params: { courseName: string };
|
||||
}) {
|
||||
const { data: course } = useLocalCourseDetailsQuery(courseName);
|
||||
console.log(course);
|
||||
|
||||
const startDate = getDateFromStringOrThrow(course.settings.startDate);
|
||||
const endDate = getDateFromStringOrThrow(course.settings.endDate);
|
||||
|
||||
const months = calendarMonthUtils.getMonthsBetweenDates(startDate, endDate);
|
||||
const months = getMonthsBetweenDates(startDate, endDate);
|
||||
return (
|
||||
<div>
|
||||
{course.settings.name}
|
||||
<div>
|
||||
{months.map((month) => (
|
||||
<div key={month.month + "" + month.year}>{month.month}</div>
|
||||
<CalendarMonth key={month.month + "" + month.year} month={month} localCourse={course} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user