diff --git a/src/components/robot/RecordingsTable.tsx b/src/components/robot/RecordingsTable.tsx index 8b4143a2..f0c0a4da 100644 --- a/src/components/robot/RecordingsTable.tsx +++ b/src/components/robot/RecordingsTable.tsx @@ -148,7 +148,6 @@ export const RecordingsTable = ({ const [rows, setRows] = React.useState([]); 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) { @@ -222,15 +220,13 @@ export const RecordingsTable = ({ }) .filter(Boolean) .sort((a, b) => b.parsedDate.getTime() - a.parsedDate.getTime()); - + setRecordings(parsedRows.map((recording) => recording.name)); setRows(parsedRows); } } catch (error) { console.error('Error fetching recordings:', error); notify('error', t('recordingtable.notifications.fetch_error')); - } finally { - setIsLoading(false); } }, [setRecordings, notify, t]); @@ -359,39 +355,32 @@ export const RecordingsTable = ({ - {isLoading ? ( - - - - ) : ( - - - - - {columns.map((column) => ( - - {column.label} - - ))} - - - - {visibleRows.map((row) => ( - + +
+ + + {columns.map((column) => ( + + {column.label} + ))} - -
-
- )} + + + + {visibleRows.map((row) => ( + + ))} + + +