Commit f16f089e by G

added a button to start the verification of the transaction state. it is not…

added a button to start the verification of the transaction state. it is not fully implemented only a starter for the moment
parent c9ebead9
import type { MainStackScreenComponentProps } from "@/navigations/Types"; import type { MainStackScreenComponentProps } from "@/navigations/Types";
import Button from "@components/Button";
import BackgroundWithBeasyIconAndWhiteContentArea from "@components/backgrounds/BackgroundWithBeasyIconAndWhiteContentArea"; import BackgroundWithBeasyIconAndWhiteContentArea from "@components/backgrounds/BackgroundWithBeasyIconAndWhiteContentArea";
import Box from "@components/bases/Box"; import Box from "@components/bases/Box";
import Text from "@components/bases/Text"; import Text from "@components/bases/Text";
import useWave from "@hooks/useWave";
import { LOG } from "@logger"; import { LOG } from "@logger";
import { Dimensions } from "react-native"; import { Dimensions } from "react-native";
// biome-ignore lint/style/useNamingConvention: <explanation> // biome-ignore lint/style/useNamingConvention: <explanation>
...@@ -13,10 +15,9 @@ const WaveQrCodePaymentScreen: MainStackScreenComponentProps<"waveQrCodePaymentS ...@@ -13,10 +15,9 @@ const WaveQrCodePaymentScreen: MainStackScreenComponentProps<"waveQrCodePaymentS
route, route,
navigation, navigation,
}) => { }) => {
const paymentUrl = route.params?.paymentUrl ?? ""; const data = route.params.data;
console.log("paymentUrl", paymentUrl);
const windowWidth = Dimensions.get("window").width; const windowWidth = Dimensions.get("window").width;
// const sixtyPercentHeight = window * 0.5; const { handlePaymentVerification } = useWave();
return ( return (
<BackgroundWithBeasyIconAndWhiteContentArea goBack={true}> <BackgroundWithBeasyIconAndWhiteContentArea goBack={true}>
...@@ -54,12 +55,20 @@ const WaveQrCodePaymentScreen: MainStackScreenComponentProps<"waveQrCodePaymentS ...@@ -54,12 +55,20 @@ const WaveQrCodePaymentScreen: MainStackScreenComponentProps<"waveQrCodePaymentS
mb={"l"} mb={"l"}
> >
<QRCode <QRCode
value={paymentUrl} value={data.wave_launch_url}
size={windowWidth - 120} size={windowWidth - 120}
// backgroundColor={theme.colors.secondary} // backgroundColor={theme.colors.secondary}
/> />
</Box> </Box>
<Text>Veuillez scanner le QR Code pour terminer le paiement</Text> <Text>Veuillez scanner le QR Code pour terminer le paiement</Text>
<Box width={"100%"} mt={"x100"}>
<Button
variant={"full"}
textVariants={"white"}
label="Verification"
onPress={() => handlePaymentVerification(data.id)}
/>
</Box>
</Box> </Box>
</BackgroundWithBeasyIconAndWhiteContentArea> </BackgroundWithBeasyIconAndWhiteContentArea>
); );
......
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