chore: lint

This commit is contained in:
karishmas6
2024-10-21 15:21:12 +05:30
parent a804f8d31a
commit 13ca1155b2

View File

@@ -112,99 +112,99 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
}, [hasScrapeListAction, hasScrapeSchemaAction, hasScreenshotAction, setIsOpen]); }, [hasScrapeListAction, hasScrapeSchemaAction, hasScreenshotAction, setIsOpen]);
return ( return (
<Grid container> <Grid container>
<Grid item xs={12} md={9} lg={9}> <Grid item xs={12} md={9} lg={9}>
<Button <Button
onClick={toggleDrawer(true)} onClick={toggleDrawer(true)}
variant="contained" variant="contained"
color="primary" color="primary"
sx={{ sx={{
marginTop: '10px', marginTop: '10px',
color: 'white', color: 'white',
position: 'absolute', position: 'absolute',
background: '#ff00c3', background: '#ff00c3',
border: 'none', border: 'none',
padding: '10px 20px', padding: '10px 20px',
width: '900px', width: '900px',
overflow: 'hidden', overflow: 'hidden',
textAlign: 'left', textAlign: 'left',
justifyContent: 'flex-start', justifyContent: 'flex-start',
'&:hover': { '&:hover': {
backgroundColor: '#ff00c3', backgroundColor: '#ff00c3',
}, },
}}
>
Output Data Preview
</Button>
<SwipeableDrawer
anchor="bottom"
open={isOpen}
onClose={toggleDrawer(false)}
onOpen={toggleDrawer(true)}
PaperProps={{
sx: {
background: 'white',
color: 'black',
padding: '10px',
height: 500,
width: width - 10,
display: 'flex',
},
}}
>
<Typography variant="h6" gutterBottom>
<StorageIcon /> Output Data Preview
</Typography>
<div
style={{
height: '50vh',
overflow: 'none',
padding: '10px',
}} }}
> >
Output Data Preview {tableData.length > 0 ? (
</Button> <TableContainer component={Paper}>
<SwipeableDrawer <Table sx={{ minWidth: 650 }} stickyHeader aria-label="output data table">
anchor="bottom" <TableHead>
open={isOpen} <TableRow>
onClose={toggleDrawer(false)} {columns.map((column) => (
onOpen={toggleDrawer(true)} <TableCell key={column}>{column}</TableCell>
PaperProps={{ ))}
sx: { </TableRow>
background: 'white', </TableHead>
color: 'black', <TableBody>
padding: '10px', {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => (
height: 500, <TableRow key={index}>
width: width - 10,
display: 'flex',
},
}}
>
<Typography variant="h6" gutterBottom>
<StorageIcon /> Output Data Preview
</Typography>
<div
style={{
height: '50vh',
overflow: 'none',
padding: '10px',
}}
>
{tableData.length > 0 ? (
<TableContainer component={Paper}>
<Table sx={{ minWidth: 650 }} stickyHeader aria-label="output data table">
<TableHead>
<TableRow>
{columns.map((column) => ( {columns.map((column) => (
<TableCell key={column}>{column}</TableCell> <TableCell key={column}>{row[column]}</TableCell>
))} ))}
</TableRow> </TableRow>
</TableHead> ))}
<TableBody> </TableBody>
{tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( </Table>
<TableRow key={index}> </TableContainer>
{columns.map((column) => ( ) : (
<TableCell key={column}>{row[column]}</TableCell> <Grid container justifyContent="center" alignItems="center" style={{ height: '100%' }}>
))} <Grid item>
</TableRow> {hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction ? (
))} <>
</TableBody>
</Table>
</TableContainer>
) : (
<Grid container justifyContent="center" alignItems="center" style={{ height: '100%' }}>
<Grid item>
{hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction ? (
<>
<Typography variant="h6" gutterBottom align="left">
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.
</Typography>
<SidePanelHeader />
</>
) : (
<Typography variant="h6" gutterBottom align="left"> <Typography variant="h6" gutterBottom align="left">
It looks like you have not selected anything for extraction yet. Once you do, the robot will show a preview of your selections here. 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.
</Typography> </Typography>
)} <SidePanelHeader />
</Grid> </>
) : (
<Typography variant="h6" gutterBottom align="left">
It looks like you have not selected anything for extraction yet. Once you do, the robot will show a preview of your selections here.
</Typography>
)}
</Grid> </Grid>
)} </Grid>
<div style={{ float: 'left', clear: 'both' }} ref={logEndRef} /> )}
</div> <div style={{ float: 'left', clear: 'both' }} ref={logEndRef} />
</SwipeableDrawer> </div>
</Grid> </SwipeableDrawer>
</Grid> </Grid>
); </Grid>
);
} }