chore: lint

This commit is contained in:
karishmas6
2024-08-21 21:15:59 +05:30
parent 044513f54d
commit c90b80e9ae

View File

@@ -27,7 +27,7 @@ export const InterpretationLog = () => {
} }
const handleLog = useCallback((msg: string, date: boolean = true) => { const handleLog = useCallback((msg: string, date: boolean = true) => {
if (!date){ if (!date) {
setLog((prevState) => prevState + '\n' + msg); setLog((prevState) => prevState + '\n' + msg);
} else { } else {
setLog((prevState) => prevState + '\n' + `[${new Date().toLocaleString()}] ` + msg); setLog((prevState) => prevState + '\n' + `[${new Date().toLocaleString()}] ` + msg);
@@ -42,9 +42,9 @@ export const InterpretationLog = () => {
scrollLogToBottom(); scrollLogToBottom();
}, [log, scrollLogToBottom]) }, [log, scrollLogToBottom])
const handleBinaryCallback = useCallback(({data, mimetype}: any) => { const handleBinaryCallback = useCallback(({ data, mimetype }: any) => {
setLog((prevState) => setLog((prevState) =>
prevState + '\n' + '---------- Binary output data received ----------' + '\n' prevState + '\n' + '---------- Binary output data received ----------' + '\n'
+ `mimetype: ${mimetype}` + '\n' + `data: ${JSON.stringify(data)}` + '\n' + `mimetype: ${mimetype}` + '\n' + `data: ${JSON.stringify(data)}` + '\n'
+ '------------------------------------------------'); + '------------------------------------------------');
scrollLogToBottom(); scrollLogToBottom();
@@ -66,10 +66,10 @@ export const InterpretationLog = () => {
<Accordion <Accordion
expanded={expanded} expanded={expanded}
onChange={handleChange(!expanded)} onChange={handleChange(!expanded)}
style={{background: '#3f4853', color: 'white', borderRadius: '0px'}} style={{ background: '#3f4853', color: 'white', borderRadius: '0px' }}
> >
<AccordionSummary <AccordionSummary
expandIcon={<ExpandMoreIcon sx={{color: 'white'}}/>} expandIcon={<ExpandMoreIcon sx={{ color: 'white' }} />}
aria-controls="panel1bh-content" aria-controls="panel1bh-content"
id="panel1bh-header" id="panel1bh-header"
> >
@@ -88,8 +88,8 @@ export const InterpretationLog = () => {
<Highlight className="javascript"> <Highlight className="javascript">
{log} {log}
</Highlight> </Highlight>
<div style={{ float:"left", clear: "both" }} <div style={{ float: "left", clear: "both" }}
ref={logEndRef}/> ref={logEndRef} />
</div> </div>
</AccordionDetails> </AccordionDetails>
</Accordion> </Accordion>