Skip to content

Commit

Permalink
Merge pull request #1633 from RoboSats/fix-book-pagination
Browse files Browse the repository at this point in the history
Fix book pagination
  • Loading branch information
KoalaSat authored Nov 26, 2024
2 parents cf26011 + e8421f7 commit 65fcb64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/BookTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const BookTable = ({

const [paginationModel, setPaginationModel] = useState<GridPaginationModel>({
pageSize: 0,
page: 0,
page: 1,
});
const [columnVisibilityModel, setColumnVisibilityModel] = useState<GridColumnVisibilityModel>({});
const [fullscreen, setFullscreen] = useState(defaultFullscreen);
Expand All @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Charts/DepthChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const DepthChart: React.FC<DepthChartProps> = ({
useEffect(() => {
setCurrencyCode(fav.currency); // as selected in BookControl
setCoordinatorFilter(fav.coordinator);
console.log(fav.coordinator);
}, [fav.currency, fav.coordinator]);

useEffect(() => {
Expand Down

0 comments on commit 65fcb64

Please sign in to comment.