mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
moving v2 to top level
This commit is contained in:
22
src/app/course/[courseName]/lecture/[lectureDay]/page.tsx
Normal file
22
src/app/course/[courseName]/lecture/[lectureDay]/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import EditLecture from "./EditLecture";
|
||||
import {
|
||||
getDateFromStringOrThrow,
|
||||
getDateOnlyMarkdownString,
|
||||
} from "@/models/local/utils/timeUtils";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function page({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ lectureDay: string }>;
|
||||
}) {
|
||||
const { lectureDay } = await params;
|
||||
const decodedLectureDay = decodeURIComponent(lectureDay);
|
||||
console.log(decodedLectureDay);
|
||||
const lectureDate = getDateFromStringOrThrow(
|
||||
decodedLectureDay,
|
||||
"lecture day in lecture page"
|
||||
);
|
||||
const lectureDayOnly = getDateOnlyMarkdownString(lectureDate);
|
||||
return <EditLecture lectureDay={lectureDayOnly} />;
|
||||
}
|
||||
Reference in New Issue
Block a user