Skip to content

Commit

Permalink
Remove hard-coded skeleton height
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Jul 23, 2024
1 parent 3a2365d commit 79b50d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Tailwind/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ export function TableSkeleton({
searchData: SearchData;
setSearchData: (data: SearchData) => void;
}) {
const height = Math.max(10, participantCount) * ROW_HEIGHT_PX;
const rowsPerScreen = Math.ceil(window.innerHeight / ROW_HEIGHT_PX);
const minRows = 2 * rowsPerScreen;
const height = (participantCount > 0 ? participantCount : minRows) * ROW_HEIGHT_PX;

return (
<div>
Expand Down

0 comments on commit 79b50d4

Please sign in to comment.