chore: lint

This commit is contained in:
amhsirak
2024-11-20 05:14:34 +05:30
parent 0606c3b4a8
commit f5154b21cc

View File

@@ -31,22 +31,22 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe
setTab(tab); setTab(tab);
}, [interpretationInProgress]); }, [interpretationInProgress]);
useEffect(() => { useEffect(() => {
if (row.serializableOutput && Object.keys(row.serializableOutput).length > 0) { if (row.serializableOutput && Object.keys(row.serializableOutput).length > 0) {
const firstKey = Object.keys(row.serializableOutput)[0]; const firstKey = Object.keys(row.serializableOutput)[0];
const data = row.serializableOutput[firstKey]; const data = row.serializableOutput[firstKey];
if (Array.isArray(data)) { if (Array.isArray(data)) {
// Filter out completely empty rows // Filter out completely empty rows
const filteredData = data.filter(row => const filteredData = data.filter(row =>
Object.values(row).some(value => value !== undefined && value !== "") Object.values(row).some(value => value !== undefined && value !== "")
); );
setTableData(filteredData); setTableData(filteredData);
if (filteredData.length > 0) { if (filteredData.length > 0) {
setColumns(Object.keys(filteredData[0])); setColumns(Object.keys(filteredData[0]));
}
} }
} }
} }, [row.serializableOutput]);
}, [row.serializableOutput]);
// Function to convert table data to CSV format // Function to convert table data to CSV format