Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Prasetya Saputra
clone_excelso
Commits
b13773e9
Commit
b13773e9
authored
May 11, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update reward select
parent
e443f3d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
RewardSelect.js
view/RewardSelect.js
+24
-4
No files found.
view/RewardSelect.js
View file @
b13773e9
...
...
@@ -25,8 +25,10 @@ class RewardSelect extends React.Component {
this
.
_unsubscribe
()
}
handleSelect
(){
handleSelect
(
item
){
console
.
log
(
item
)
console
.
log
(
this
.
props
.
voucher
)
console
.
log
(
this
.
props
.
value_voucher
)
}
getRewardsList
()
{
...
...
@@ -60,7 +62,7 @@ class RewardSelect extends React.Component {
<
ScrollView
style
=
{
styles
.
body
}
>
{
this
.
state
.
rewardsList
.
map
((
item
,
key
)
=>
(
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
handleSelect
()}
>
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
handleSelect
(
item
)}
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
Card
style
=
{{
padding
:
5
,
margin
:
10
}}
>
<
View
>
...
...
@@ -118,8 +120,26 @@ const mapStateToProps = (state) => {
return
{
session_id
:
state
.
session_id
,
value_voucher
:
state
.
value_voucher
,
voucher
:
state
.
voucher
,
}
}
const
mapDispatchToProps
=
(
dispacth
)
=>
{
return
{
setVoucher
:
(
voucherProps
)
=>
dispacth
({
type
:
ActionType
.
SET_VOUCHER
,
data
:
{
voucher
:
voucherProps
.
voucher
,
value_voucher
:
voucherProps
.
value_voucher
,
}
}),
}
}
export
default
connect
(
mapStateToProps
)(
RewardSelect
);
\ No newline at end of file
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
RewardSelect
);
\ No newline at end of file
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