diff --git a/src/screens/TransactionHistoryScreen.tsx b/src/screens/TransactionHistoryScreen.tsx index e2947eb..d001385 100644 --- a/src/screens/TransactionHistoryScreen.tsx +++ b/src/screens/TransactionHistoryScreen.tsx @@ -1,8 +1,9 @@ -import { getTransactionsHistory } from "@/utils/requests/transactions"; +import Input from "@components/Input"; import TransactionInformationsItem from "@components/TransactionInformationsItem"; import BackgroundWithBeasyIconAndWhiteContentArea from "@components/backgrounds/BackgroundWithBeasyIconAndWhiteContentArea"; +import Box from "@components/bases/Box"; +import useTransactionsHistory from "@hooks/useTransactionsHistory"; import { LOG } from "@logger"; -import { useQuery } from "@tanstack/react-query"; import { RefreshControl, ScrollView } from "react-native"; const log = LOG.extend("TransactionHistoryScreen"); @@ -10,37 +11,44 @@ const log = LOG.extend("TransactionHistoryScreen"); const TransactionHistoryScreen = () => { log.verbose("TransactionHistoryScreen"); - const { data, isLoading, error, refetch } = useQuery({ - queryKey: ["transactionsHistory"], - queryFn: getTransactionsHistory, - }); + const { transactionsHistory: data, isLoading, error, refetch } = useTransactionsHistory(); + + // const { data, isLoading, error, refetch } = useQuery({ + // queryKey: ["transactionsHistory"], + // queryFn: getTransactionsHistory, + // }); console.info("Data", data); return ( - } - contentContainerStyle={{ - gap: 10, - padding: 10, - marginTop: 10, - paddingBottom: 30, - flexDirection: "column", - }} - showsVerticalScrollIndicator={false} - > - {data?.map((transaction) => ( - - ))} - + <> + + + + } + contentContainerStyle={{ + gap: 10, + padding: 10, + // marginTop: 10, + paddingBottom: 30, + flexDirection: "column", + }} + showsVerticalScrollIndicator={false} + > + {data?.map((transaction) => ( + + ))} + + ); };