feat: rm loading logic for robots table
This commit is contained in:
@@ -148,7 +148,6 @@ export const RecordingsTable = ({
|
||||
const [rows, setRows] = React.useState<Data[]>([]);
|
||||
const [isModalOpen, setModalOpen] = React.useState(false);
|
||||
const [searchTerm, setSearchTerm] = React.useState('');
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
|
||||
const columns = useMemo(() => [
|
||||
{ id: 'interpret', label: t('recordingtable.run'), minWidth: 80 },
|
||||
@@ -202,7 +201,6 @@ export const RecordingsTable = ({
|
||||
};
|
||||
|
||||
const fetchRecordings = useCallback(async () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const recordings = await getStoredRecordings();
|
||||
if (recordings) {
|
||||
@@ -229,8 +227,6 @@ export const RecordingsTable = ({
|
||||
} catch (error) {
|
||||
console.error('Error fetching recordings:', error);
|
||||
notify('error', t('recordingtable.notifications.fetch_error'));
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}, [setRecordings, notify, t]);
|
||||
|
||||
@@ -359,11 +355,6 @@ export const RecordingsTable = ({
|
||||
</IconButton>
|
||||
</Box>
|
||||
</Box>
|
||||
{isLoading ? (
|
||||
<Box display="flex" justifyContent="center" alignItems="center" height="50%">
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
) : (
|
||||
<TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden', marginTop: '15px' }}>
|
||||
<Table stickyHeader aria-label="sticky table">
|
||||
<TableHead>
|
||||
@@ -371,7 +362,6 @@ export const RecordingsTable = ({
|
||||
{columns.map((column) => (
|
||||
<MemoizedTableCell
|
||||
key={column.id}
|
||||
// align={column.align}
|
||||
style={{ minWidth: column.minWidth }}
|
||||
>
|
||||
{column.label}
|
||||
@@ -391,7 +381,6 @@ export const RecordingsTable = ({
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
)}
|
||||
|
||||
<TablePagination
|
||||
rowsPerPageOptions={[10, 25, 50, 100]}
|
||||
|
||||
Reference in New Issue
Block a user