diff --git a/src/components/dashboard/Officer_EventManagement.astro b/src/components/dashboard/Officer_EventManagement.astro index 99b2445..c9d23c0 100644 --- a/src/components/dashboard/Officer_EventManagement.astro +++ b/src/components/dashboard/Officer_EventManagement.astro @@ -672,7 +672,7 @@ const currentPage = eventResponse.page;
@@ -699,17 +699,12 @@ const currentPage = eventResponse.page;No data
; - - const headers = csvData[0]; - const allRows = csvData.slice(1); - const rows = allRows.slice(0, visibleLines); - const remainingRows = allRows.length - visibleLines; - const hasMore = remainingRows > 0; - - return ( -{header} | - ))} -
---|
{cell} | - ))} -
No content
; - - if (fileExtension === 'csv') { - const csvData = parseCSV(textContent); - return renderCSVTable(csvData); - } - - const lines = textContent.split('\n'); - const content = truncateContent(textContent, visibleLines); - const remainingLines = lines.length - visibleLines; - const hasMore = remainingLines > 0; - - const renderContent = () => { - if (isCode) { - const language = getHighlightLanguage(fileExtension); - const highlightedCode = highlightCode(content, language); - return ( -
- );
- }
-
- return {content}
;
};
- return (
- - {renderContent()} --
{error}
+
+ {fileContent}
+
+
+ {filename}
+ +{filename}
+ + Download File + +{filename}
+ + Download File + +Preview not available for this file type
- - Download File - -