feat: rm loading from runs table
This commit is contained in:
@@ -133,7 +133,6 @@ export const RunsTable: React.FC<RunsTableProps> = ({
|
|||||||
|
|
||||||
const [rows, setRows] = useState<Data[]>([]);
|
const [rows, setRows] = useState<Data[]>([]);
|
||||||
const [searchTerm, setSearchTerm] = useState('');
|
const [searchTerm, setSearchTerm] = useState('');
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
|
||||||
|
|
||||||
const [paginationStates, setPaginationStates] = useState<PaginationState>({});
|
const [paginationStates, setPaginationStates] = useState<PaginationState>({});
|
||||||
|
|
||||||
@@ -212,7 +211,6 @@ export const RunsTable: React.FC<RunsTableProps> = ({
|
|||||||
|
|
||||||
const fetchRuns = useCallback(async () => {
|
const fetchRuns = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
|
||||||
const runs = await getStoredRuns();
|
const runs = await getStoredRuns();
|
||||||
if (runs) {
|
if (runs) {
|
||||||
const parsedRows: Data[] = runs.map((run: any, index: number) => ({
|
const parsedRows: Data[] = runs.map((run: any, index: number) => ({
|
||||||
@@ -225,8 +223,6 @@ export const RunsTable: React.FC<RunsTableProps> = ({
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notify('error', t('runstable.notifications.fetch_error'));
|
notify('error', t('runstable.notifications.fetch_error'));
|
||||||
} finally {
|
|
||||||
setIsLoading(false);
|
|
||||||
}
|
}
|
||||||
}, [notify, t]);
|
}, [notify, t]);
|
||||||
|
|
||||||
@@ -364,14 +360,6 @@ export const RunsTable: React.FC<RunsTableProps> = ({
|
|||||||
: <UnfoldMore fontSize="small" />;
|
: <UnfoldMore fontSize="small" />;
|
||||||
}, [accordionSortConfigs]);
|
}, [accordionSortConfigs]);
|
||||||
|
|
||||||
if (isLoading) {
|
|
||||||
return (
|
|
||||||
<Box display="flex" justifyContent="center" alignItems="center" height="50vh">
|
|
||||||
<CircularProgress />
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Box display="flex" justifyContent="space-between" alignItems="center" mb={2}>
|
<Box display="flex" justifyContent="space-between" alignItems="center" mb={2}>
|
||||||
|
|||||||
Reference in New Issue
Block a user