Commit fcdef96b by G

fix the gap property not working by using contentContainerStyle and removing the box wrapper

parent d8d7c62b
import { getTransactionsHistory } from "@/utils/requests/transactions"; import { getTransactionsHistory } from "@/utils/requests/transactions";
import TransactionInformationsItem from "@components/TransactionInformationsItem"; import TransactionInformationsItem from "@components/TransactionInformationsItem";
import BackgroundWithBeasyIconAndWhiteContentArea from "@components/backgrounds/BackgroundWithBeasyIconAndWhiteContentArea"; import BackgroundWithBeasyIconAndWhiteContentArea from "@components/backgrounds/BackgroundWithBeasyIconAndWhiteContentArea";
import Box from "@components/bases/Box";
import { LOG } from "@logger"; import { LOG } from "@logger";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
import { ScrollView } from "react-native"; import { RefreshControl, ScrollView } from "react-native";
const log = LOG.extend("TransactionHistoryScreen"); const log = LOG.extend("TransactionHistoryScreen");
const TransactionHistoryScreen = () => { const TransactionHistoryScreen = () => {
log.verbose("TransactionHistoryScreen"); log.verbose("TransactionHistoryScreen");
const { data, isLoading, error } = useQuery({ const { data, isLoading, error, refetch } = useQuery({
queryKey: ["transactionsHistory"], queryKey: ["transactionsHistory"],
queryFn: getTransactionsHistory, queryFn: getTransactionsHistory,
}); });
...@@ -21,12 +20,12 @@ const TransactionHistoryScreen = () => { ...@@ -21,12 +20,12 @@ const TransactionHistoryScreen = () => {
return ( return (
<BackgroundWithBeasyIconAndWhiteContentArea> <BackgroundWithBeasyIconAndWhiteContentArea>
<ScrollView <ScrollView
style={{ flex: 1, gap: 100, flexDirection: "column" }} refreshControl={<RefreshControl refreshing={isLoading} onRefresh={refetch} />}
contentContainerStyle={{ flex: 1, gap: 5, flexDirection: "column" }}
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
> >
{data?.map((transaction) => ( {data?.map((transaction) => (
// <Text key={transaction.reference}>{transaction.reference}</Text> // <Text key={transaction.reference}>{transaction.reference}</Text>
<Box key={transaction.reference} mb={"s"}>
<TransactionInformationsItem <TransactionInformationsItem
key={transaction.reference} key={transaction.reference}
paymentType={transaction.type_paiement_label} paymentType={transaction.type_paiement_label}
...@@ -35,7 +34,6 @@ const TransactionHistoryScreen = () => { ...@@ -35,7 +34,6 @@ const TransactionHistoryScreen = () => {
date={transaction.date} date={transaction.date}
status={transaction.status} status={transaction.status}
/> />
</Box>
))} ))}
</ScrollView> </ScrollView>
</BackgroundWithBeasyIconAndWhiteContentArea> </BackgroundWithBeasyIconAndWhiteContentArea>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment