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
b508b908
Commit
b508b908
authored
Jul 15, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change toast
parent
23fbcedd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
app.json
app.json
+1
-1
Home.js
view/Home.js
+24
-5
No files found.
app.json
View file @
b508b908
{
{
"expo"
:
{
"expo"
:
{
"extra"
:
{
"extra"
:
{
"buildNumber"
:
"12
0
"
,
"buildNumber"
:
"12
3
"
,
"remarks"
:
""
"remarks"
:
""
},
},
...
...
view/Home.js
View file @
b508b908
...
@@ -103,8 +103,21 @@ class Home extends React.Component {
...
@@ -103,8 +103,21 @@ class Home extends React.Component {
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
// console.log(response.msg)
// custom Toast
Alert
.
alert
(
''
,
response
.
msg
);
// Toast.show(response.msg, {
// position: 0,
// containerStyle: { backgroundColor: 'white', borderRadius: 10 },
// textColor: '#838383',
// textStyle: { fontSize: 14, fontFamily: 'Gotham-Black' }
// })
Toast
.
show
(
response
.
msg
)
// Tes Logout jika session habis
// let configProps = {
// session_id: ''
// }
// this.props.setConfig(configProps);
// this.props.navigation.replace('Login');
})
})
}
}
...
@@ -325,9 +338,9 @@ class Home extends React.Component {
...
@@ -325,9 +338,9 @@ class Home extends React.Component {
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
{
Platform
.
OS
===
'ios'
?
(
{
Platform
.
OS
===
'ios'
?
(
<
CustomIosStatusBar
color
=
'#CFB368'
/>
<
CustomIosStatusBar
color
=
'#CFB368'
/>
)
:
(
)
:
(
<
StatusBar
backgroundColor
=
'#CFB368'
/>
<
StatusBar
backgroundColor
=
'#CFB368'
/>
)}
)}
<
ScrollView
>
<
ScrollView
>
<
View
style
=
{{
flex
:
6
}}
>
<
View
style
=
{{
flex
:
6
}}
>
...
@@ -848,6 +861,12 @@ const mapDispatchToProps = (dispacth) => {
...
@@ -848,6 +861,12 @@ const mapDispatchToProps = (dispacth) => {
card_number
:
setCardNumberProps
.
card_number
,
card_number
:
setCardNumberProps
.
card_number
,
}
}
}),
}),
setConfig
:
(
configProps
)
=>
dispacth
({
type
:
ActionType
.
SET_LOGOUT
,
data
:
{
session_id
:
configProps
.
session_id
}
}),
}
}
}
}
...
...
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