diff --git a/src/screens/PaymentAmountInputScreen.tsx b/src/screens/PaymentAmountInputScreen.tsx index 28fb94b..9155aec 100644 --- a/src/screens/PaymentAmountInputScreen.tsx +++ b/src/screens/PaymentAmountInputScreen.tsx @@ -1,60 +1,91 @@ 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 PaymentOption from "@components/PaymentOption"; -import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea"; +import BackgroundDefault from "@components/backgrounds/BackgroundDefault"; import Box from "@components/bases/Box"; -import { SafeAreaView } from "react-native-safe-area-context"; +import Text from "@components/bases/Text"; +import { useState } from "react"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountInputScreen"> = ({ route, navigation, }) => { const { paymentType } = route.params; + const [amountToPay, setAmountToPay] = useState(0); - console.log("Payment type :: {}", paymentType); + const insets = useSafeAreaInsets(); + + const updateAmountToPay = (amount: string) => { + const amountParsed = Number.parseInt(amount); + if (!Number.isNaN(amountParsed)) { + return setAmountToPay(amountParsed); + } + + return setAmountToPay(0); + }; return ( - - - - - - navigation.goBack()} /> - - + + {/* */} + + + + navigation.goBack()} /> + + {/* + */} + + Montant à payé + + {amountToPay} + + + + + {}} paymentMethod={paymentType} /> - - - {}} paymentMethod={paymentType} /> - - - - -