Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
cb3b77ed
Commit
cb3b77ed
authored
May 14, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dummy test to assert if its working.
parent
5362842e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
PaymentAmountInputScreen.tsx
src/screens/PaymentAmountInputScreen.tsx
+35
-1
No files found.
src/screens/PaymentAmountInputScreen.tsx
View file @
cb3b77ed
import
type
{
PaymentStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
type
{
PaymentStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
{
type
IorangePaymentStarter
,
getTransactionsData
}
from
"@/utils/requests/orangePayment"
;
import
BeasyLogoIcon
from
"@components/BeasyLogoIcon"
;
import
BeasyLogoIcon
from
"@components/BeasyLogoIcon"
;
import
Button
from
"@components/Button"
;
import
Button
from
"@components/Button"
;
import
GoBackIconButton
from
"@components/GoBackIconButton"
;
import
GoBackIconButton
from
"@components/GoBackIconButton"
;
...
@@ -7,6 +8,7 @@ import PaymentOption from "@components/PaymentOption";
...
@@ -7,6 +8,7 @@ import PaymentOption from "@components/PaymentOption";
import
BackgroundDefault
from
"@components/backgrounds/BackgroundDefault"
;
import
BackgroundDefault
from
"@components/backgrounds/BackgroundDefault"
;
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
{
useMutation
}
from
"@tanstack/react-query"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
useSafeAreaInsets
}
from
"react-native-safe-area-context"
;
import
{
useSafeAreaInsets
}
from
"react-native-safe-area-context"
;
...
@@ -28,6 +30,38 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -28,6 +30,38 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
return
setAmountToPay
(
0
);
return
setAmountToPay
(
0
);
};
};
const
dummyObject
:
IorangePaymentStarter
=
{
// biome-ignore lint/style/useNamingConvention: <API requirements>
type_paiement
:
1
,
marchand
:
"1"
,
service
:
"1"
,
montant
:
10
,
commentaire
:
"commentaire"
,
numero
:
"0707070707"
,
};
const
omPaymentMutation
=
useMutation
({
mutationFn
:
()
=>
getTransactionsData
(
dummyObject
),
onSuccess
:
(
data
)
=>
{
console
.
log
(
"om starter response"
,
data
);
},
onError
:
(
err
)
=>
{
console
.
log
(
"om start error "
,
err
);
},
});
const
handlePaymentButton
=
()
=>
{
switch
(
paymentType
)
{
case
"OM"
:
console
.
log
(
"OM so we stays on screen"
);
omPaymentMutation
.
mutate
();
break
;
default
:
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
);
break
;
}
};
return
(
return
(
<
BackgroundDefault
>
<
BackgroundDefault
>
{
/* <SafeAreaView> */
}
{
/* <SafeAreaView> */
}
...
@@ -77,7 +111,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -77,7 +111,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
/>
/>
</
Box
>
</
Box
>
<
Button
<
Button
onPress=
{
()
=>
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
)
}
onPress=
{
handlePaymentButton
}
variant=
{
"full"
}
variant=
{
"full"
}
textVariants=
{
"primary"
}
textVariants=
{
"primary"
}
label=
"Payer"
label=
"Payer"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment