fix: loading skeleton appearing out of order in history table (#1759)

This commit is contained in:
Shuchang Zheng
2025-02-12 03:52:39 +08:00
committed by GitHub
parent 4999d58743
commit 5db9a3890c

View File

@@ -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">