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