mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
doing more trpc, still working on preloading
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
import { CalendarMonthModel } from "./calendarMonthUtils";
|
||||
import { DayOfWeek } from "@/models/local/localCourse";
|
||||
import { DayOfWeek } from "@/models/local/localCourseSettings";
|
||||
import { Expandable } from "@/components/Expandable";
|
||||
import { CalendarWeek } from "./CalendarWeek";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
} from "@/models/local/timeUtils";
|
||||
import { useDraggingContext } from "../../context/drag/draggingContext";
|
||||
import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks";
|
||||
import { getDayOfWeek } from "@/models/local/localCourse";
|
||||
import { getDayOfWeek } from "@/models/local/localCourseSettings";
|
||||
import { ItemInDay } from "./ItemInDay";
|
||||
import { useTodaysItems } from "./useTodaysItems";
|
||||
import { DayTitle } from "./DayTitle";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks";
|
||||
import { getDayOfWeek } from "@/models/local/localCourse";
|
||||
import { getDayOfWeek } from "@/models/local/localCourseSettings";
|
||||
import { getDateFromString } from "@/models/local/timeUtils";
|
||||
import { getLectureWeekName } from "@/services/fileStorage/utils/lectureUtils";
|
||||
import { getCourseUrl, getLecturePreviewUrl } from "@/services/urlUtils";
|
||||
|
||||
@@ -3,11 +3,12 @@ import CourseContextProvider from "../../context/CourseContextProvider";
|
||||
|
||||
export default async function LectureLayout({
|
||||
children,
|
||||
params: { courseName, lectureDay },
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { courseName: string; lectureDay: string };
|
||||
params: Promise<{ courseName: string; lectureDay: string }>;
|
||||
}) {
|
||||
const { courseName, lectureDay } = await params;
|
||||
const decodedCourseName = decodeURIComponent(courseName);
|
||||
if (courseName.includes(".js.map")) {
|
||||
console.log("cannot load course that is .js.map " + decodedCourseName);
|
||||
|
||||
@@ -4,11 +4,12 @@ import {
|
||||
getDateOnlyMarkdownString,
|
||||
} from "@/models/local/timeUtils";
|
||||
|
||||
export default function page({
|
||||
params: { lectureDay },
|
||||
export default async function page({
|
||||
params,
|
||||
}: {
|
||||
params: { lectureDay: string };
|
||||
params: Promise<{ lectureDay: string }>;
|
||||
}) {
|
||||
const { lectureDay } = await params;
|
||||
const decodedLectureDay = decodeURIComponent(lectureDay);
|
||||
console.log(decodedLectureDay);
|
||||
const lectureDate = getDateFromStringOrThrow(
|
||||
|
||||
@@ -4,11 +4,12 @@ import {
|
||||
} from "@/models/local/timeUtils";
|
||||
import LecturePreviewPage from "./LecturePreviewPage";
|
||||
|
||||
export default function Page({
|
||||
params: { lectureDay },
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: { lectureDay: string };
|
||||
params: Promise<{ lectureDay: string }>;
|
||||
}) {
|
||||
const { lectureDay } = await params;
|
||||
const decodedLectureDay = decodeURIComponent(lectureDay);
|
||||
console.log(decodedLectureDay);
|
||||
const lectureDate = getDateFromStringOrThrow(
|
||||
|
||||
@@ -13,7 +13,7 @@ import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHoo
|
||||
import ClientOnly from "@/components/ClientOnly";
|
||||
import { SuspenseAndErrorHandling } from "@/components/SuspenseAndErrorHandling";
|
||||
import { AssignmentSubmissionType } from "@/models/local/assignment/assignmentSubmissionType";
|
||||
import { LocalCourseSettings } from "@/models/local/localCourse";
|
||||
import { LocalCourseSettings } from "@/models/local/localCourseSettings";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { AssignmentButtons } from "./AssignmentButtons";
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React from "react";
|
||||
import EditAssignment from "./EditAssignment";
|
||||
import ClientOnly from "@/components/ClientOnly";
|
||||
|
||||
export default function Page({
|
||||
params: { moduleName, assignmentName },
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: { assignmentName: string; moduleName: string };
|
||||
params: Promise<{ assignmentName: string; moduleName: string }>;
|
||||
}) {
|
||||
const { moduleName, assignmentName } = await params;
|
||||
const decodedAssignmentName = decodeURIComponent(assignmentName);
|
||||
const decodedModuleName = decodeURIComponent(moduleName);
|
||||
return (
|
||||
|
||||
@@ -2,10 +2,11 @@ import React from "react";
|
||||
import EditPage from "./EditPage";
|
||||
|
||||
export default async function Page({
|
||||
params: { moduleName, pageName },
|
||||
params,
|
||||
}: {
|
||||
params: { pageName: string; moduleName: string };
|
||||
params: Promise<{ pageName: string; moduleName: string }>;
|
||||
}) {
|
||||
const { moduleName, pageName } = await params;
|
||||
const decodedPageName = decodeURIComponent(pageName);
|
||||
const decodedModuleName = decodeURIComponent(moduleName);
|
||||
return <EditPage pageName={decodedPageName} moduleName={decodedModuleName} />;
|
||||
|
||||
@@ -2,10 +2,11 @@ import React from "react";
|
||||
import EditQuiz from "./EditQuiz";
|
||||
|
||||
export default async function Page({
|
||||
params: { moduleName, quizName },
|
||||
params,
|
||||
}: {
|
||||
params: { quizName: string; moduleName: string };
|
||||
params: Promise<{ quizName: string; moduleName: string }>;
|
||||
}) {
|
||||
const { moduleName, quizName } = await params;
|
||||
const decodedQuizName = decodeURIComponent(quizName)
|
||||
const decodedModuleName = decodeURIComponent(moduleName)
|
||||
return <EditQuiz quizName={decodedQuizName} moduleName={decodedModuleName} />;
|
||||
|
||||
Reference in New Issue
Block a user