docker: initial container creation
This commit is contained in:
14
app/client.tsx
Normal file
14
app/client.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { TTCMD } from "@/components/ttcmd";
|
||||
import { FC, use } from "react";
|
||||
|
||||
export const HomeClient: FC<{ body: Promise<string> }> = ({ body }) => {
|
||||
const text = use(body);
|
||||
|
||||
return (
|
||||
<TTCMD
|
||||
body={text}
|
||||
/>
|
||||
);
|
||||
};
|
11
app/page.tsx
11
app/page.tsx
@@ -1,9 +1,12 @@
|
||||
import { readMD } from "@/actions/readMD";
|
||||
import { TTCMD } from "@/components/ttcmd";
|
||||
import { readFile } from "fs/promises";
|
||||
import { Suspense } from "react";
|
||||
import { HomeClient } from "./client";
|
||||
import { Loader } from "@/components/loader";
|
||||
|
||||
export default function Home() {
|
||||
const body = readFile("./md/home.md", "utf-8");
|
||||
const body = readMD("./md/home.md");
|
||||
return (
|
||||
<>
|
||||
<section className="heading">
|
||||
@@ -132,10 +135,8 @@ export default function Home() {
|
||||
</cite>
|
||||
</section> */
|
||||
}
|
||||
<Suspense>
|
||||
<TTCMD
|
||||
body={body}
|
||||
/>
|
||||
<Suspense fallback={<Loader />}>
|
||||
<HomeClient body={body} />
|
||||
</Suspense>
|
||||
</>
|
||||
);
|
||||
|
Reference in New Issue
Block a user