From 2d886a825911ab43d6c2d0209f9b24b254c380c3 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 27 Sep 2024 23:39:30 +0530 Subject: [PATCH] feat: interpretation log --- src/components/molecules/InterpretationLog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index 3feda80c..1af5bc8c 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -25,7 +25,7 @@ interface InterpretationLogProps { setIsOpen: (isOpen: boolean) => void; } -export const InterpretationLog: React.FC = ({ isOpen, setIsOpen }) => { +export const InterpretationLog: React.FC = ({ isOpen, setIsOpen }) => { const [log, setLog] = useState(''); const [selectedOption, setSelectedOption] = useState('10'); const [customValue, setCustomValue] = useState(''); @@ -66,12 +66,12 @@ export const InterpretationLog: React.FC = ({ isOpen, se setLog((prevState) => prevState + '\n' + '---------- Serializable output data received ----------' + '\n' + JSON.stringify(data, null, 2) + '\n' + '--------------------------------------------------'); - + // Set table data if (Array.isArray(data)) { setTableData(data); } - + scrollLogToBottom(); }, [log, scrollLogToBottom]); @@ -104,7 +104,7 @@ export const InterpretationLog: React.FC = ({ isOpen, se // Extract columns dynamically from the first item of tableData const columns = tableData.length > 0 ? Object.keys(tableData[0]) : []; - + return (