From eed217277705f8d58e812c2129b01f809734b364 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Fri, 14 Jun 2024 10:42:27 +0200 Subject: [PATCH] Remove hard-coded skeleton height --- src/Components/Tailwind/Table.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/Tailwind/Table.tsx b/src/Components/Tailwind/Table.tsx index f1731d0..c527823 100644 --- a/src/Components/Tailwind/Table.tsx +++ b/src/Components/Tailwind/Table.tsx @@ -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 (