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
abe02174
Commit
abe02174
authored
Jun 19, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render a nice looking qr code for the payment
parent
41350041
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
1 deletion
+40
-1
WaveQrCodePaymentScreen.tsx
src/screens/WaveQrCodePaymentScreen.tsx
+40
-1
No files found.
src/screens/WaveQrCodePaymentScreen.tsx
View file @
abe02174
...
...
@@ -3,6 +3,9 @@ import BackgroundWithBeasyIconAndWhiteContentArea from "@components/backgrounds/
import
Box
from
"@components/bases/Box"
;
import
Text
from
"@components/bases/Text"
;
import
{
LOG
}
from
"@logger"
;
import
{
Dimensions
}
from
"react-native"
;
// biome-ignore lint/style/useNamingConvention: <explanation>
import
QRCode
from
"react-native-qrcode-svg"
;
const
log
=
LOG
.
extend
(
"WaveQrCodePaymentScreen"
);
...
...
@@ -10,6 +13,11 @@ const WaveQrCodePaymentScreen: MainStackScreenComponentProps<"waveQrCodePaymentS
route
,
navigation
,
})
=>
{
const
paymentUrl
=
route
.
params
?.
paymentUrl
??
""
;
console
.
log
(
"paymentUrl"
,
paymentUrl
);
const
windowWidth
=
Dimensions
.
get
(
"window"
).
width
;
// const sixtyPercentHeight = window * 0.5;
return
(
<
BackgroundWithBeasyIconAndWhiteContentArea
goBack=
{
true
}
>
<
Box
...
...
@@ -18,8 +26,39 @@ const WaveQrCodePaymentScreen: MainStackScreenComponentProps<"waveQrCodePaymentS
width
:
"100%"
,
}
}
p=
{
"m"
}
alignItems=
{
"center"
}
>
<
Text
variant=
{
"black"
}
mb=
{
"l"
}
fontSize=
{
20
}
textAlign=
{
"center"
}
fontWeight=
{
"bold"
}
>
Votre QR Code
</
Text
>
<
Box
style=
{
{
height
:
windowWidth
-
80
,
aspectRatio
:
1
}
}
backgroundColor=
{
"primary"
}
alignItems=
{
"center"
}
justifyContent=
{
"center"
}
borderRadius=
{
20
}
borderWidth=
{
2
}
borderColor=
{
"secondary"
}
shadowOffset=
{
{
width
:
0
,
height
:
10
}
}
shadowOpacity=
{
0.5
}
shadowRadius=
{
13.16
}
elevation=
{
20
}
mb=
{
"l"
}
>
<
Text
>
WaveQrCodePaymentScreen
</
Text
>
<
QRCode
value=
{
paymentUrl
}
size=
{
windowWidth
-
120
}
// backgroundColor={theme.colors.secondary}
/>
</
Box
>
<
Text
>
Veuillez scanner le QR Code pour terminer le paiement
</
Text
>
</
Box
>
</
BackgroundWithBeasyIconAndWhiteContentArea
>
);
...
...
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