27 lines
575 B
TypeScript
27 lines
575 B
TypeScript
import { TTCMD } from "@/components/ttcmd";
|
|
import { readFile } from "fs/promises";
|
|
import Error from "next/error";
|
|
import { Suspense } from "react";
|
|
|
|
export default async function Help({
|
|
params,
|
|
}: {
|
|
params: { article: string };
|
|
}) {
|
|
const body = readFile(
|
|
"./md/help articles/" + decodeURIComponent(params.article),
|
|
"utf-8",
|
|
);
|
|
return (
|
|
<>
|
|
<section className="heading">
|
|
<h2 className="strapline">Help</h2>
|
|
<h1>How to use TTCMD</h1>
|
|
</section>
|
|
<Suspense>
|
|
<TTCMD body={body} />
|
|
</Suspense>
|
|
</>
|
|
);
|
|
}
|