Commit 21151e97 by G

handling loading state and request done with results

parent 1378854e
...@@ -59,16 +59,25 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith ...@@ -59,16 +59,25 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
flexWrap={"wrap"} flexWrap={"wrap"}
rowGap={"m"} rowGap={"m"}
> >
{paymentTypesWithActiveStatus.map((paymentType) => ( {isLoading && (
<PaymentOptionContainer key={paymentType.id}> <Box flex={1}>
<PaymentOption <Text textAlign={"center"}>
onPress={() => Chargement des méthodes de paiement...
navigation.navigate("paymentAmountInputScreen") </Text>
} </Box>
paymentMethod={paymentType.code} )}
/> {!isLoading &&
</PaymentOptionContainer> !error &&
))} paymentTypesWithActiveStatus.map((paymentType) => (
<PaymentOptionContainer key={paymentType.id}>
<PaymentOption
onPress={() =>
navigation.navigate("paymentAmountInputScreen")
}
paymentMethod={paymentType.code}
/>
</PaymentOptionContainer>
))}
</Box> </Box>
</Box> </Box>
</Box> </Box>
......
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