From e8421f74245e24c58a3dfbaaccac71176f366ae3 Mon Sep 17 00:00:00 2001 From: koalasat Date: Mon, 25 Nov 2024 11:21:18 +0100 Subject: [PATCH] Fix book pagination --- frontend/src/components/BookTable/index.tsx | 8 ++++---- frontend/src/components/Charts/DepthChart/index.tsx | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/BookTable/index.tsx b/frontend/src/components/BookTable/index.tsx index e175e559..a854229d 100644 --- a/frontend/src/components/BookTable/index.tsx +++ b/frontend/src/components/BookTable/index.tsx @@ -98,7 +98,7 @@ const BookTable = ({ const [paginationModel, setPaginationModel] = useState({ pageSize: 0, - page: 0, + page: 1, }); const [columnVisibilityModel, setColumnVisibilityModel] = useState({}); const [fullscreen, setFullscreen] = useState(defaultFullscreen); @@ -121,10 +121,10 @@ const BookTable = ({ useEffect(() => { setPaginationModel({ - pageSize: federation.loading && orders.length === 0 ? 0 : defaultPageSize, - page: paginationModel.page, + pageSize: defaultPageSize, + page: paginationModel.page ?? 1, }); - }, [federationUpdatedAt, orders, defaultPageSize]); + }, [defaultPageSize]); const localeText = useMemo(() => { return { diff --git a/frontend/src/components/Charts/DepthChart/index.tsx b/frontend/src/components/Charts/DepthChart/index.tsx index 7e1ebabe..2617b911 100644 --- a/frontend/src/components/Charts/DepthChart/index.tsx +++ b/frontend/src/components/Charts/DepthChart/index.tsx @@ -65,7 +65,6 @@ const DepthChart: React.FC = ({ useEffect(() => { setCurrencyCode(fav.currency); // as selected in BookControl setCoordinatorFilter(fav.coordinator); - console.log(fav.coordinator); }, [fav.currency, fav.coordinator]); useEffect(() => {