From e9206a1ddeb98c1645f3be2c01beb25dd08a5d47 Mon Sep 17 00:00:00 2001 From: G Date: Wed, 8 May 2024 15:14:31 +0000 Subject: [PATCH] sending the params paymentType when navigating to the Amount screen and logging it --- src/screens/HomePageWithPaymentOptions.tsx | 7 ++++++- src/screens/PaymentAmountInputScreen.tsx | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/screens/HomePageWithPaymentOptions.tsx b/src/screens/HomePageWithPaymentOptions.tsx index e1ce0d9..6f8f898 100644 --- a/src/screens/HomePageWithPaymentOptions.tsx +++ b/src/screens/HomePageWithPaymentOptions.tsx @@ -72,7 +72,12 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith - navigation.navigate("paymentAmountInputScreen") + navigation.navigate( + "paymentAmountInputScreen", + { + paymentType: paymentType.code, + }, + ) } paymentMethod={paymentType.code} /> diff --git a/src/screens/PaymentAmountInputScreen.tsx b/src/screens/PaymentAmountInputScreen.tsx index 8ac18d4..e3d4a20 100644 --- a/src/screens/PaymentAmountInputScreen.tsx +++ b/src/screens/PaymentAmountInputScreen.tsx @@ -9,8 +9,13 @@ import Box from "@components/bases/Box"; import { SafeAreaView } from "react-native-safe-area-context"; const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountInputScreen"> = ({ + route, navigation, }) => { + const { paymentType } = route.params; + + console.log("Payment type :: {}", paymentType); + return ( -- libgit2 0.27.1