Skip to content

Commit bf7f2eb

Browse files
committed
Fix: prevent scroll shift by maintaining table height during loading
1 parent e533d9b commit bf7f2eb

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

components/discover/defiTableSkeleton.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,28 @@ import { TEXT_TYPE } from "@constants/typography";
1111
const DefiTableSkeleton: React.FC = () => {
1212
return (
1313
<div className="w-full overflow-x-auto">
14-
<div className="rounded-xl border-[1px] border-[#f4faff4d] min-w-[930px] xl:w-full">
14+
<div className=" border-[1px] border-[#f4faff4d] min-w-[930px] xl:w-full">
1515
<Table>
1616
<TableBody>
1717
{Array.from({ length: 10 }).map((_, index) => (
1818
<TableRow key={index} className="animate-pulse">
1919
<TableCell>
20-
<div className="h-8 w-full bg-gray-300 rounded-md" />
20+
<div className="h-[2.525rem] bg-gray-300 rounded-md" />
2121
</TableCell>
2222
<TableCell>
23-
<div className="h-8 bg-gray-300 rounded-md" />
23+
<div className="h-[2.525rem] bg-gray-300 rounded-md" />
2424
</TableCell>
2525
<TableCell>
26-
<div className="h-8 bg-gray-300 rounded-md" />
26+
<div className="h-[2.525rem] bg-gray-300 rounded-md" />
2727
</TableCell>
2828
<TableCell>
29-
<div className="h-8 bg-gray-300 rounded-md" />
29+
<div className="h-[2.525rem] bg-gray-300 rounded-md" />
3030
</TableCell>
3131
<TableCell>
32-
<div className="h-8 bg-gray-300 rounded-md" />
32+
<div className="h-[2.525rem] bg-gray-300 rounded-md" />
3333
</TableCell>
3434
<TableCell>
35-
<div className="h-8 bg-gray-300 rounded-md" />
35+
<div className="h-[2.525rem] bg-gray-300 rounded-md" />
3636
</TableCell>
3737
</TableRow>
3838
))}

0 commit comments

Comments
 (0)