Commit 21151e97 by G

handling loading state and request done with results

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