mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 21:02:13 +01:00
21 lines
424 B
TypeScript
21 lines
424 B
TypeScript
import { marked } from "marked";
|
|
export default async function Page({
|
|
params,
|
|
}: {
|
|
params: { tutorial: string };
|
|
}) {
|
|
const requestData = await fetch(`http://127.0.0.1:3000/test.json`, {
|
|
cache: "no-store", //! Just for dev
|
|
/*next: { revalidate: 10 }*/
|
|
});
|
|
const data = await requestData.json();
|
|
|
|
return (
|
|
<div
|
|
dangerouslySetInnerHTML={{
|
|
__html: marked.parse(data.markdown) ?? "",
|
|
}}
|
|
></div>
|
|
);
|
|
}
|