+
+
+ setSearchTerm(e.target.value)} // Handle search input change
+ />
+
+
+
{loading ? (
) : (
@@ -70,22 +107,37 @@ const Documents: React.FC
= ({
{t('settings.documents.name')} |
- {t('settings.documents.date')} |
- {t('settings.documents.tokenUsage')} |
- {t('settings.documents.type')} |
+
+
+ {t('settings.documents.date')}
+
+
+ |
+
+
+ {t('settings.documents.tokenUsage')}
+
+
+ |
+
+
+ {t('settings.documents.type')}
+
+
+ |
|
- {!documents?.length && (
+ {!filteredDocuments?.length && (
{t('settings.documents.noData')}
|
)}
- {documents &&
- documents.map((document, index) => (
+ {filteredDocuments &&
+ filteredDocuments.map((document, index) => (
{document.name} |
{document.date} |
@@ -101,7 +153,7 @@ const Documents: React.FC = ({
{
event.stopPropagation();
@@ -130,6 +182,19 @@ const Documents: React.FC = ({
)}
+ {/* Conditionally render the Upload modal based on modalState */}
+ {modalState === 'ACTIVE' && (
+
+
+ {/* Your Upload component */}
+
+
+
+ )}
);