From eca08b09a91e76de5211fa4b8f10fea0a0d45131 Mon Sep 17 00:00:00 2001 From: G Date: Sat, 27 Apr 2024 22:33:45 +0000 Subject: [PATCH] enforce a more consistent rectangle shape across different screen size. all payment option will lead to the default input page for now --- src/screens/HomePageWithPaymentOptions.tsx | 71 +++++++++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/src/screens/HomePageWithPaymentOptions.tsx b/src/screens/HomePageWithPaymentOptions.tsx index 3f27bb5..1e74825 100644 --- a/src/screens/HomePageWithPaymentOptions.tsx +++ b/src/screens/HomePageWithPaymentOptions.tsx @@ -6,6 +6,7 @@ import PaymentOption from "@components/PaymentOption"; import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea"; import Box from "@components/bases/Box"; import Text from "@components/bases/Text"; +import { Dimensions } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWithPaymentOptions"> = @@ -32,37 +33,48 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith Méthode de paiement - - {/* Payment Modes */} - + + navigation.navigate("paymentAmountInputScreen") } paymentMethod={"OrangeMoney"} /> - - - {}} paymentMethod={"MtnMoney"} /> - - - - {}} paymentMethod={"MoovMoney"} /> - - - - {}} paymentMethod={"WaveMoney"} /> - - - - {}} paymentMethod={"VisaCard"} /> - + + + + navigation.navigate("paymentAmountInputScreen") + } + paymentMethod={"MtnMoney"} + /> + + + + + + navigation.navigate("paymentAmountInputScreen") + } + paymentMethod={"MoovMoney"} + /> + + + + navigation.navigate("paymentAmountInputScreen") + } + paymentMethod={"WaveMoney"} + /> + + + navigation.navigate("paymentAmountInputScreen")} + paymentMethod={"VisaCard"} + /> + @@ -71,3 +83,14 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith }; export default HomePageWithPaymentOptions; + +const screenWidth = Dimensions.get("window").width; +const paymentOptionCardWidth = screenWidth / 2 - 30; +const paymentOptionCardHeight = paymentOptionCardWidth * 0.65; +const PaymentOptionContainer = ({ children }: { children: React.ReactNode }) => { + return ( + + {children} + + ); +}; -- libgit2 0.27.1