From f5154b21cca0f9aa765d42b6bc911c5daee54ded Mon Sep 17 00:00:00 2001 From: amhsirak Date: Wed, 20 Nov 2024 05:14:34 +0530 Subject: [PATCH] chore: lint --- src/components/molecules/RunContent.tsx | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/molecules/RunContent.tsx b/src/components/molecules/RunContent.tsx index 0c163368..c0beb51e 100644 --- a/src/components/molecules/RunContent.tsx +++ b/src/components/molecules/RunContent.tsx @@ -31,22 +31,22 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe setTab(tab); }, [interpretationInProgress]); -useEffect(() => { - if (row.serializableOutput && Object.keys(row.serializableOutput).length > 0) { - const firstKey = Object.keys(row.serializableOutput)[0]; - const data = row.serializableOutput[firstKey]; - if (Array.isArray(data)) { - // Filter out completely empty rows - const filteredData = data.filter(row => - Object.values(row).some(value => value !== undefined && value !== "") - ); - setTableData(filteredData); - if (filteredData.length > 0) { - setColumns(Object.keys(filteredData[0])); + useEffect(() => { + if (row.serializableOutput && Object.keys(row.serializableOutput).length > 0) { + const firstKey = Object.keys(row.serializableOutput)[0]; + const data = row.serializableOutput[firstKey]; + if (Array.isArray(data)) { + // Filter out completely empty rows + const filteredData = data.filter(row => + Object.values(row).some(value => value !== undefined && value !== "") + ); + setTableData(filteredData); + if (filteredData.length > 0) { + setColumns(Object.keys(filteredData[0])); + } } } - } -}, [row.serializableOutput]); + }, [row.serializableOutput]); // Function to convert table data to CSV format