2024-03-14 02:39:49 -06:00

26 lines
615 B
TypeScript

import { readMD } from "@/actions/readMD";
import { HelpClient } from "./client";
import { Suspense } from "react";
import { MDSkeletonLoader } from "@/components/loader";
// export const
export default async function Help({
params,
}: {
params: { article: string };
}) {
if (!params.article.endsWith(".md")) return;
const body = readMD(
"./md/help articles/" + decodeURIComponent(params.article),
);
return (
<Suspense fallback={<MDSkeletonLoader />}>
<HelpClient
body={body}
title={decodeURIComponent(params.article).replace(".md", "")}
/>
</Suspense>
);
}