From 9563df4c55da2e985d303552cc16851cd5b9b533 Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Thu, 19 Dec 2024 20:15:28 +0000 Subject: [PATCH] feat: fix pagination for fills (#5228) * feat: fix pagination for fills * fix: remove unnecessary tag --- .../src/components/orders/OrderDetails/FillsTableWithData.tsx | 2 +- .../orders/OrderDetails/context/FillsTableContext.tsx | 2 +- apps/explorer/src/components/orders/OrderDetails/index.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/explorer/src/components/orders/OrderDetails/FillsTableWithData.tsx b/apps/explorer/src/components/orders/OrderDetails/FillsTableWithData.tsx index 6fdf28b00a..920a3a43b8 100644 --- a/apps/explorer/src/components/orders/OrderDetails/FillsTableWithData.tsx +++ b/apps/explorer/src/components/orders/OrderDetails/FillsTableWithData.tsx @@ -18,7 +18,7 @@ type Props = { } export const FillsTableWithData: React.FC = ({ areTokensLoaded, order, isPriceInverted, invertPrice }) => { - const { trades, tableState } = useContext(FillsTableContext) + const { data: trades, tableState } = useContext(FillsTableContext) const isFirstRender = useFirstRender() return isFirstRender || !areTokensLoaded ? ( diff --git a/apps/explorer/src/components/orders/OrderDetails/context/FillsTableContext.tsx b/apps/explorer/src/components/orders/OrderDetails/context/FillsTableContext.tsx index 35dd94b813..f7ad3e361a 100644 --- a/apps/explorer/src/components/orders/OrderDetails/context/FillsTableContext.tsx +++ b/apps/explorer/src/components/orders/OrderDetails/context/FillsTableContext.tsx @@ -5,7 +5,7 @@ import { Trade } from 'api/operator' import { TableState, TableStateSetters } from '../../../../explorer/components/TokensTableWidget/useTable' type CommonState = { - trades: Trade[] + data: Trade[] isLoading: boolean tableState: TableState } & TableStateSetters diff --git a/apps/explorer/src/components/orders/OrderDetails/index.tsx b/apps/explorer/src/components/orders/OrderDetails/index.tsx index ac8e47d609..debf07668d 100644 --- a/apps/explorer/src/components/orders/OrderDetails/index.tsx +++ b/apps/explorer/src/components/orders/OrderDetails/index.tsx @@ -72,7 +72,7 @@ export type Props = { export enum TabView { OVERVIEW = 1, - FILLS, + FILLS = 2, } const DEFAULT_TAB = TabView[1] @@ -225,7 +225,7 @@ export const OrderDetails: React.FC = (props) => { ))}