From b4bb8cfcf3cf3c00623bcd654909683c2c98d361 Mon Sep 17 00:00:00 2001 From: G Date: Fri, 26 Apr 2024 15:37:15 +0000 Subject: [PATCH] all are type checked as part of the stack navigation. screens beside the home of the stack include a go back button --- src/screens/HomePageWithPaymentOptions.tsx | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------- src/screens/NumberAndOtpForPaymentScreen.tsx | 5 ++++- src/screens/PaymentAmountInputScreen.tsx | 7 ++++++- 3 files changed, 61 insertions(+), 46 deletions(-) diff --git a/src/screens/HomePageWithPaymentOptions.tsx b/src/screens/HomePageWithPaymentOptions.tsx index 764aa06..3f27bb5 100644 --- a/src/screens/HomePageWithPaymentOptions.tsx +++ b/src/screens/HomePageWithPaymentOptions.tsx @@ -1,3 +1,4 @@ +import type { PaymentStackScreenComponentProps } from "@/navigations/Types"; import BalanceContainer from "@components/BalanceContainer"; import BeasyLogoIcon from "@components/BeasyLogoIcon"; import NotificationIconButton from "@components/NotificationIconButton"; @@ -7,60 +8,66 @@ import Box from "@components/bases/Box"; import Text from "@components/bases/Text"; import { SafeAreaView } from "react-native-safe-area-context"; -const HomePageWithPaymentOptions = () => { - return ( - - - - - - - - - - - - - - Méthode de paiement - - +const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWithPaymentOptions"> = + ({ navigation }) => { + return ( + + + - {/* Payment Modes */} - - {}} paymentMethod={"OrangeMoney"} /> - - - {}} paymentMethod={"MtnMoney"} /> + + + + + + + + + + Méthode de paiement + + + {/* Payment Modes */} + + + navigation.navigate("paymentAmountInputScreen") + } + paymentMethod={"OrangeMoney"} + /> + + + {}} paymentMethod={"MtnMoney"} /> + - - {}} paymentMethod={"MoovMoney"} /> - + + {}} paymentMethod={"MoovMoney"} /> + - - {}} paymentMethod={"WaveMoney"} /> - + + {}} paymentMethod={"WaveMoney"} /> + - - {}} paymentMethod={"VisaCard"} /> + + {}} paymentMethod={"VisaCard"} /> + - - - - ); -}; + + + ); + }; export default HomePageWithPaymentOptions; diff --git a/src/screens/NumberAndOtpForPaymentScreen.tsx b/src/screens/NumberAndOtpForPaymentScreen.tsx index 6ae3e40..e85c339 100644 --- a/src/screens/NumberAndOtpForPaymentScreen.tsx +++ b/src/screens/NumberAndOtpForPaymentScreen.tsx @@ -1,3 +1,4 @@ +import type { PaymentStackScreenComponentProps } from "@/navigations/Types"; import BeasyLogoIcon from "@components/BeasyLogoIcon"; import Button from "@components/Button"; import Input from "@components/Input"; @@ -7,7 +8,9 @@ import Box from "@components/bases/Box"; import Text from "@components/bases/Text"; import { SafeAreaView } from "react-native-safe-area-context"; -const NumberAndOtpForPaymentScreen = () => { +const NumberAndOtpForPaymentScreen: PaymentStackScreenComponentProps< + "numberAndOtpForPaymentScreen" +> = ({ navigation }) => { return ( diff --git a/src/screens/PaymentAmountInputScreen.tsx b/src/screens/PaymentAmountInputScreen.tsx index 7d5b6d6..1c87e2d 100644 --- a/src/screens/PaymentAmountInputScreen.tsx +++ b/src/screens/PaymentAmountInputScreen.tsx @@ -1,12 +1,16 @@ +import type { PaymentStackScreenComponentProps } from "@/navigations/Types"; import BalanceContainer from "@components/BalanceContainer"; import BeasyLogoIcon from "@components/BeasyLogoIcon"; import Button from "@components/Button"; +import GoBackIconButton from "@components/GoBackIconButton"; import Input from "@components/Input"; import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea"; import Box from "@components/bases/Box"; import { SafeAreaView } from "react-native-safe-area-context"; -const PaymentAmountInputScreen = () => { +const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountInputScreen"> = ({ + navigation, +}) => { return ( @@ -19,6 +23,7 @@ const PaymentAmountInputScreen = () => { mb={"l"} > + navigation.goBack()} /> -- libgit2 0.27.1