Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eCartPro-Customer
Project
Project
Details
Activity
Releases
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
Dida Adams Arizona
eCartPro-Customer
Commits
a8098f1b
Commit
a8098f1b
authored
Jul 20, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update malem
parent
ccc7b4c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
MyAccountScreen.js
App/Containers/MyAccountScreen.js
+14
-0
Api.js
App/Services/Api.js
+2
-0
No files found.
App/Containers/MyAccountScreen.js
View file @
a8098f1b
...
...
@@ -12,6 +12,7 @@ import BaseHeader from '../Components/BaseHeader';
import
{
Images
}
from
'../Themes'
;
import
BaseText
from
'../Components/BaseText'
;
import
Toast
from
'react-native-toast-message'
import
Api
from
'../Services/Api'
class
MyAccountScreen
extends
Component
{
constructor
(
props
)
{
...
...
@@ -66,6 +67,19 @@ class MyAccountScreen extends Component {
this
.
props
.
navigation
.
navigate
(
'ChangePasswordScreen'
);
}
else
if
(
type
==
'Keluar'
)
{
this
.
props
.
authClearData
()
Api
.
create
().
logout
(
this
.
props
.
auth
.
user
.
data
.
user_id
).
then
((
response
)
=>
{
// console.log(response.data)
Toast
.
show
({
type
:
'success'
,
position
:
'bottom'
,
text1
:
'Success'
,
text2
:
`
${
response
.
data
.
message
}
👋`
,
visibilityTime
:
2500
,
autoHide
:
true
,
// topOffset: 100,
// bottomOffset: 40,
})
})
const
resetAction
=
StackActions
.
reset
({
index
:
0
,
actions
:
[
...
...
App/Services/Api.js
View file @
a8098f1b
...
...
@@ -63,6 +63,7 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
const
getRate
=
()
=>
api
.
get
(
'rate_limit'
)
const
getUser
=
(
username
)
=>
api
.
get
(
'search/users'
,
{
q
:
username
})
const
login
=
(
body
)
=>
api
.
post
(
'login'
,
body
)
const
logout
=
(
userId
)
=>
api
.
post
(
`logout/
${
userId
}
`
)
const
registerUser
=
(
body
)
=>
api
.
post
(
'register'
,
body
)
const
changePassword
=
(
body
)
=>
api
.
post
(
'change_password'
,
body
)
const
forgotPassword
=
(
body
)
=>
api
.
post
(
'forgot_password'
,
body
)
...
...
@@ -133,6 +134,7 @@ const create = (baseURL = 'https://apiecart.eksad.com/mobile/') => {
contactUs
,
getUser
,
login
,
logout
,
registerUser
,
changePassword
,
forgotPassword
,
...
...
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