Skip to content

Commit dc40381

Browse files
committed
fix: ドキュメント管理のタイトルと見出しをナレッジ管理に変更し、説明文を追加
fix: DocumentListコンポーネントでのドキュメント名のクリック時にonEditを呼び出すよう修正
1 parent 32da548 commit dc40381

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

frontend/src/app/(main)/documents/page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,13 @@ export default function DocumentsPage() {
116116
return (
117117
<>
118118
<Head>
119-
<title>ドキュメント管理</title> {/* タイトルを設定 */}
119+
<title>ナレッジ管理</title> {/* タイトルを設定 */}
120120
</Head>
121121
<main className="flex flex-col text-gray-800 w-full h-full overflow-y-auto">
122-
<h1 className="text-xl font-bold text-center">ドキュメント管理</h1>
122+
<h1 className="text-xl font-bold text-center">ナレッジ管理</h1>
123+
<p className="text-sm text-center text-gray-600 mt-2">
124+
登録したナレッジをもとにチャットアプリで質問回答できます。
125+
</p>
123126
<div className="flex justify-center items-center p-4 space-x-2">
124127
<Suspense fallback={<p>カテゴリを取得中...</p>}>
125128
<CategoryDropdown

frontend/src/components/documents/DocumentList.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CosmosItem } from "@/models/models";
2-
import { FaEdit, FaTrash, FaPlus } from "react-icons/fa";
2+
import { FaTrash, FaPlus } from "react-icons/fa";
33

44
export default function DocumentList({
55
documents,
@@ -32,14 +32,13 @@ export default function DocumentList({
3232
key={doc.id}
3333
className="border-b py-2 flex justify-between items-center"
3434
>
35-
<p className="text-sm">{doc.file_name}</p>
35+
<p
36+
className="text-sm cursor-pointer text-blue-500"
37+
onClick={() => onEdit(doc)} // ドキュメント名をクリックしたときにonEditを呼び出す
38+
>
39+
{doc.file_name}
40+
</p>
3641
<div className="flex space-x-2">
37-
<button
38-
className="text-blue-500 text-sm"
39-
onClick={() => onEdit(doc)}
40-
>
41-
<FaEdit />
42-
</button>
4342
<button
4443
className="text-red-500 text-sm"
4544
onClick={() => onDelete(doc.id)}

0 commit comments

Comments
 (0)