feat: show circular progress while runs load

This commit is contained in:
amhsirak
2025-01-17 22:50:44 +05:30
parent b756af0ea1
commit 88ed7717dc

View File

@@ -160,6 +160,11 @@ export const RunsTable: React.FC<RunsTableProps> = ({
sx={{ width: '250px' }} sx={{ width: '250px' }}
/> />
</Box> </Box>
{rows.length === 0 ? (
<Box display="flex" justifyContent="center" alignItems="center" height="100%">
<CircularProgress />
</Box>
) : (
<TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden' }}> <TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden' }}>
{Object.entries(groupedRows).map(([id, data]) => ( {Object.entries(groupedRows).map(([id, data]) => (
<Accordion key={id} onChange={(event, isExpanded) => handleAccordionChange(id, isExpanded)}> <Accordion key={id} onChange={(event, isExpanded) => handleAccordionChange(id, isExpanded)}>
@@ -202,6 +207,7 @@ export const RunsTable: React.FC<RunsTableProps> = ({
</Accordion> </Accordion>
))} ))}
</TableContainer> </TableContainer>
)}
<TablePagination <TablePagination
rowsPerPageOptions={[10, 25, 50]} rowsPerPageOptions={[10, 25, 50]}
component="div" component="div"