fix: loading skeleton appearing out of order in history table (#1759)
This commit is contained in:
@@ -70,23 +70,22 @@ function RunHistory() {
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{isFetching
|
||||
? Array.from({ length: 10 }).map((_, index) => (
|
||||
{isFetching ? (
|
||||
Array.from({ length: 10 }).map((_, index) => (
|
||||
<TableRow key={index}>
|
||||
<TableCell colSpan={4}>
|
||||
<Skeleton className="h-4 w-full" />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))
|
||||
: null}
|
||||
{!isFetching && runs?.length === 0 ? (
|
||||
) : runs?.length === 0 ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={4}>
|
||||
<div className="text-center">No runs found</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : null}
|
||||
{runs?.map((run) => {
|
||||
) : (
|
||||
runs?.map((run) => {
|
||||
if (isTask(run)) {
|
||||
return (
|
||||
<TableRow
|
||||
@@ -141,7 +140,8 @@ function RunHistory() {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
})}
|
||||
})
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
<Pagination className="pt-2">
|
||||
|
||||
Reference in New Issue
Block a user