feat: add a row for no document state

This commit is contained in:
Anas Khafaga
2024-10-01 15:29:58 +03:00
parent 40907a2584
commit b5dc7281f9
5 changed files with 15 additions and 4 deletions

View File

@@ -54,7 +54,8 @@
"name": "Document Name",
"date": "Vector Date",
"type": "Type",
"tokenUsage": "Token Usage"
"tokenUsage": "Token Usage",
"noData": "No existing Documents"
},
"apiKeys": {
"label": "Chatbots",

View File

@@ -54,7 +54,8 @@
"name": "Nombre del Documento",
"date": "Fecha Vector",
"type": "Tipo",
"tokenUsage": "Uso de Tokens"
"tokenUsage": "Uso de Tokens",
"noData": "No hay documentos existentes"
},
"apiKeys": {
"label": "Chatbots",

View File

@@ -54,7 +54,8 @@
"name": "ドキュメント名",
"date": "ベクトル日付",
"type": "タイプ",
"tokenUsage": "トークン使用量"
"tokenUsage": "トークン使用量",
"noData": "既存のドキュメントはありません"
},
"apiKeys": {
"label": "チャットボット",

View File

@@ -54,7 +54,8 @@
"name": "文件名称",
"date": "向量日期",
"type": "类型",
"tokenUsage": "令牌使用"
"tokenUsage": "令牌使用",
"noData": "没有现有的文档"
},
"apiKeys": {
"label": "聊天机器人",

View File

@@ -74,6 +74,13 @@ const Documents: React.FC<DocumentsProps> = ({
</tr>
</thead>
<tbody>
{!documents?.length && (
<tr>
<td colSpan={5} className="border-r border-t p-4">
{t('settings.documents.noData')}
</td>
</tr>
)}
{documents &&
documents.map((document, index) => (
<tr key={index}>