From 54a5c591a1e29a057a50457d100e60b6087e6ccd Mon Sep 17 00:00:00 2001 From: G Date: Thu, 13 Jun 2024 10:18:41 +0000 Subject: [PATCH] no more need to reverse it here, we do that in the request definition --- src/hooks/useTransactionsHistory.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/hooks/useTransactionsHistory.tsx b/src/hooks/useTransactionsHistory.tsx index 5e80f87..6fec05f 100644 --- a/src/hooks/useTransactionsHistory.tsx +++ b/src/hooks/useTransactionsHistory.tsx @@ -18,11 +18,8 @@ const useTransactionsHistory = () => { const filterByReference = useCallback( (reference: string) => { if (!data?.length) return []; - // TODO: Update this when the api is fixed - let reversed = data.reverse(); - reversed = reversed.filter((transaction) => transaction.reference.length > 10); - return reversed.filter( + return data.filter( (transaction) => transaction.reference.includes(reference) && transaction.reference, ); }, -- libgit2 0.27.1