From 6664abd77736eaa43f664787f95c52c7ce1ba913 Mon Sep 17 00:00:00 2001 From: bagusajisaputroo Date: Mon, 28 Apr 2025 20:41:35 +0700 Subject: [PATCH] fixing sorting from the newest on wallet history --- .../wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx b/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx index 136c9b0..c2a99d3 100644 --- a/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx +++ b/src/pages/wallet/wallet-history/hooks/ManageWalletHistoryContext.tsx @@ -211,7 +211,7 @@ const ManageWalletContextProvider = ({ children }: { children: React.ReactNode } const getWalletLists = async (page: number, limit: number, sorting: any, filter: any) => { try { const sortField = sorting.length > 0 ? sorting[0].id : 'created_at'; - const sortDirection = sorting.length > 0 ? (sorting[0].desc ? 'DESC' : 'ASC') : 'ASC'; + const sortDirection = sorting.length > 0 ? (sorting[0].desc ? 'ASC' : 'DESC') : 'DESC'; // Initialize filter object let filterParams: any = {};