mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-27 07:58:31 -06:00
added catches around markdown to html, might throw exception if image error
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import MarkdownDisplay from "@/components/MarkdownDisplay";
|
||||
import { SuspenseAndErrorHandling } from "@/components/SuspenseAndErrorHandling";
|
||||
import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks";
|
||||
import { Lecture } from "@/models/local/lecture";
|
||||
import { markdownToHTMLSafe } from "@/services/htmlMarkdownUtils";
|
||||
@@ -8,15 +10,12 @@ export default function LecturePreview({ lecture }: { lecture: Lecture }) {
|
||||
<>
|
||||
<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>
|
||||
<div className="text-center font-bold text-slate-400">
|
||||
{lecture.date}
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div
|
||||
className="markdownPreview "
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: markdownToHTMLSafe(lecture.content, settings),
|
||||
}}
|
||||
></div>
|
||||
<MarkdownDisplay markdown={lecture.content} />
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user