diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLecture.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLecture.tsx index 151106c..d06622c 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLecture.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/EditLecture.tsx @@ -8,7 +8,7 @@ import { lectureToString, parseLecture, } from "@/services/fileStorage/utils/lectureUtils"; -import { useCallback, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import LecturePreview from "./LecturePreview"; import EditLectureTitle from "./EditLectureTitle"; import LectureButtons from "./LectureButtons"; diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx index e7ca519..0a5386b 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/page.tsx @@ -3,6 +3,7 @@ import { getDateFromStringOrThrow, getDateOnlyMarkdownString, } from "@/models/local/utils/timeUtils"; +export const dynamic = "force-dynamic"; export default async function page({ params, diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/LecturePreviewPage.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/LecturePreviewPage.tsx index dd206e9..ba6298b 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/LecturePreviewPage.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/LecturePreviewPage.tsx @@ -4,7 +4,6 @@ import LecturePreview from "../LecturePreview"; import { getCourseUrl, getLectureUrl } from "@/services/urlUtils"; import { useCourseContext } from "../../../context/courseContext"; import Link from "next/link"; -import { trpc } from "@/services/serverFunctions/trpcClient"; import { useLecturesSuspenseQuery } from "@/hooks/localCourse/lectureHooks"; export default function LecturePreviewPage({ @@ -17,6 +16,7 @@ export default function LecturePreviewPage({ const lecture = weeks .flatMap(({ lectures }) => lectures.map((lecture) => lecture)) .find((l) => l.date === lectureDay); + console.log(lecture); if (!lecture) { return
lecture not found for day
; diff --git a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx index 7332b71..b3e1c5e 100644 --- a/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx +++ b/nextjs/src/app/course/[courseName]/lecture/[lectureDay]/preview/page.tsx @@ -3,6 +3,7 @@ import { getDateOnlyMarkdownString, } from "@/models/local/utils/timeUtils"; import LecturePreviewPage from "./LecturePreviewPage"; +export const dynamic = "force-dynamic"; export default async function Page({ params, @@ -11,12 +12,16 @@ export default async function Page({ }) { const { lectureDay } = await params; const decodedLectureDay = decodeURIComponent(lectureDay); - console.log(decodedLectureDay); const lectureDate = getDateFromStringOrThrow( decodedLectureDay, "lecture day in lecture page" ); const lectureDayOnly = getDateOnlyMarkdownString(lectureDate); + console.log(lectureDayOnly); - return ; + return ( + <> + + + ); } diff --git a/nextjs/src/app/todaysLectures/OneCourseLectures.tsx b/nextjs/src/app/todaysLectures/OneCourseLectures.tsx index ef17e0b..2e276c9 100644 --- a/nextjs/src/app/todaysLectures/OneCourseLectures.tsx +++ b/nextjs/src/app/todaysLectures/OneCourseLectures.tsx @@ -19,6 +19,8 @@ export default function OneCourseLectures() { return (