Skip to content

Commit 81a836f

Browse files
committed
ChatFormをsectionのほうに移動
1 parent 00e436c commit 81a836f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/[docs_id]/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { notFound } from "next/navigation";
2-
import { ChatForm } from "./chatForm";
32
import { getCloudflareContext } from "@opennextjs/cloudflare";
43
import { readFile } from "node:fs/promises";
54
import { join } from "node:path";
@@ -38,7 +37,6 @@ export default async function Page({
3837
{splitMdContent.map((section, index) => (
3938
<Section key={index} section={section} />
4039
))}
41-
<ChatForm />
4240
</div>
4341
);
4442
}

app/[docs_id]/section.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
import { ReactNode } from "react";
44
import { type MarkdownSection } from "./splitMarkdown";
55
import { StyledMarkdown } from "./markdown";
6+
import { ChatForm } from "./chatForm";
67

78
// 1つのセクションのタイトルと内容を表示する。内容はMarkdownとしてレンダリングする
89
export function Section({ section }: { section: MarkdownSection }) {
910
return (
10-
<>
11+
<div>
1112
<Heading level={section.level}>{section.title}</Heading>
1213
<StyledMarkdown content={section.content} />
13-
</>
14+
<ChatForm />
15+
</div>
1416
);
1517
}
1618

0 commit comments

Comments
 (0)