mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
24 lines
820 B
TypeScript
24 lines
820 B
TypeScript
import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks";
|
|
import { Lecture } from "@/models/local/lecture";
|
|
import { markdownToHTMLSafe } from "@/services/htmlMarkdownUtils";
|
|
|
|
export default function LecturePreview({ lecture }: { lecture: Lecture }) {
|
|
const [settings] = useLocalCourseSettingsQuery();
|
|
return (
|
|
<>
|
|
<section className="border-b-slate-700 border-b-4">
|
|
<div className="text-center font-extrabold">{lecture.name}</div>
|
|
<div className="text-center font-bold text-slate-400">{lecture.date}</div>
|
|
</section>
|
|
<section>
|
|
<div
|
|
className="markdownPreview text-xl"
|
|
dangerouslySetInnerHTML={{
|
|
__html: markdownToHTMLSafe(lecture.content, settings),
|
|
}}
|
|
></div>
|
|
</section>
|
|
</>
|
|
);
|
|
}
|