diff --git a/frontend/src/pages/about_page.tsx b/frontend/src/pages/about_page.tsx index 85a23b1..3e6d62a 100644 --- a/frontend/src/pages/about_page.tsx +++ b/frontend/src/pages/about_page.tsx @@ -1,9 +1,37 @@ import Markdown from "react-markdown"; import {app} from "../app.ts"; +import {ReactElement, ReactNode} from "react"; export default function AboutPage() { return
- + { + const href = props.href as string + // @ts-ignore + if (props.children?.length === 2) { + // @ts-ignore + const first = props.children[0] as ReactNode + // @ts-ignore + const second = props.children[1] as ReactNode + + if (typeof first === "object" && (typeof second === "string" || typeof second === "object")) { + const img = first as ReactElement + // @ts-ignore + if (img.type === "img") { + return +
+ {img} +
+
+ {second} +
+
+ } + } + } + return {props.children} + } + }}> {app.siteInfo}
diff --git a/frontend/src/pages/resource_details_page.tsx b/frontend/src/pages/resource_details_page.tsx index 114813a..493b430 100644 --- a/frontend/src/pages/resource_details_page.tsx +++ b/frontend/src/pages/resource_details_page.tsx @@ -277,7 +277,6 @@ function Article({resource}: { resource: ResourceDetails }) { } } } - console.log(props.children) // @ts-ignore if (props.children?.length === 2) { // @ts-ignore