From f4d35b8eead2a4dd8b6cf3eb063e6503aacf9fb8 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 24 Oct 2024 01:00:04 +0530 Subject: [PATCH] chore: lint --- .../molecules/InterpretationLog.tsx | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index 243b0715..eaab0b77 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -76,16 +76,16 @@ export const InterpretationLog: React.FC = ({ isOpen, se const handleBinaryCallback = useCallback(({ data, mimetype }: any) => { const base64String = Buffer.from(data).toString('base64'); const imageSrc = `data:${mimetype};base64,${base64String}`; - + setLog((prevState) => prevState + '\n' + '---------- Binary output data received ----------' + '\n' + `mimetype: ${mimetype}` + '\n' + 'Image is rendered below:' + '\n' + '------------------------------------------------'); - + setBinaryData(imageSrc); scrollLogToBottom(); }, [log, scrollLogToBottom]); - + const handleCustomValueChange = (event: React.ChangeEvent) => { setCustomValue(event.target.value); @@ -164,55 +164,54 @@ export const InterpretationLog: React.FC = ({ isOpen, se padding: '10px', }} > - { - binaryData ? ( -
- Screenshot - Binary Output -
- ) : tableData.length > 0 ? ( - <> - - - - - {columns.map((column) => ( - {column} - ))} - - - - {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( - + binaryData ? ( +
+ Screenshot + Binary Output +
+ ) : tableData.length > 0 ? ( + <> + +
+ + {columns.map((column) => ( - {row[column]} + {column} ))} - ))} - -
-
- Additional rows of data will be extracted once you finish recording. - - ) : ( - - - {hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction ? ( - <> + + + {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( + + {columns.map((column) => ( + {row[column]} + ))} + + ))} + + + + Additional rows of data will be extracted once you finish recording. + + ) : ( + + + {hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction ? ( + <> + + You've successfully trained the robot to perform actions! Click on the button below to get a preview of the data your robot will extract. + + + + ) : ( - You've successfully trained the robot to perform actions! Click on the button below to get a preview of the data your robot will extract. + It looks like you have not selected anything for extraction yet. Once you do, the robot will show a preview of your selections here. - - - ) : ( - - It looks like you have not selected anything for extraction yet. Once you do, the robot will show a preview of your selections here. - - )} + )} + - - )} + )}