docker: initial container creation

This commit is contained in:
2024-03-13 04:37:40 -06:00
parent d0cb74bea8
commit 4615f11cfa
6 changed files with 40 additions and 16 deletions

14
app/client.tsx Normal file
View 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}
/>
);
};

View File

@@ -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>
</>
);