From 5b9a9932bbeeccb74f2f0d650ed8ae3f3fd38edd Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 10 Feb 2021 22:49:01 +0100 Subject: [PATCH] test table --- packages/dashboard/src/components/Table.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/dashboard/src/components/Table.js b/packages/dashboard/src/components/Table.js index 3ac0d55a..e055da4b 100644 --- a/packages/dashboard/src/components/Table.js +++ b/packages/dashboard/src/components/Table.js @@ -22,14 +22,14 @@ function Button({ children, disabled, className, ...props }) { } export default function Table({ items, count, headers, actions, offset, setOffset, pageSize = 10 }) { - useEffect(() => { - if (offset + pageSize > count) setOffset(Math.floor(count / pageSize)); - else if (offset < 0) setOffset(0); - else if (offset % pageSize) setOffset(offset - (offset % pageSize)); - }, [offset, pageSize, setOffset]); + // useEffect(() => { + // if (offset + pageSize > count) setOffset(Math.floor(count / pageSize)); + // else if (offset < 0) setOffset(0); + // else if (offset % pageSize) setOffset(offset - (offset % pageSize)); + // }, [offset, pageSize, setOffset]); if (!items) { - return <>aaaa; + return
no entries
; } return (