Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090 frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090 frontend
Commits
9bb8811a
Commit
9bb8811a
authored
Sep 23, 2021
by
IT18111170-Silva S.H.I
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: logout
parent
b3ab4668
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
8 deletions
+49
-8
Navigations/AuthStack.js
Navigations/AuthStack.js
+49
-8
No files found.
Navigations/AuthStack.js
View file @
9bb8811a
...
...
@@ -9,6 +9,7 @@ import { Leaderboard } from "../screen/Leaderboard";
import
{
PriceScreen
}
from
"
../screen/PriceScreen
"
;
import
{
gamification
}
from
"
../screen/gamification
"
;
import
{
AboutUs
}
from
"
../screen/AboutUs
"
;
import
axios
from
"
axios
"
;
const
Stack
=
createStackNavigator
();
...
...
@@ -46,14 +47,6 @@ export function AuthStack({ navigation }) {
options
=
{{
title
:
"
Sign Up Page
"
,
headerTitleAlign
:
"
center
"
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -67,6 +60,18 @@ export function AuthStack({ navigation }) {
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
axios
.
get
(
"
http://192.168.8.126:5000/logout
"
,
)
.
then
(
function
(
response
)
{
const
stngobj
=
JSON
.
stringify
(
response
.
data
)
console
.
log
(
stngobj
+
"
logged out
"
);
console
.
log
(
"
Successfully logged out
"
);
// alert("Successfully Logged out")
navigation
.
navigate
(
"
SignIn
"
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login failed
"
)
})}
/
>
);
},
...
...
@@ -83,6 +88,18 @@ export function AuthStack({ navigation }) {
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
axios
.
get
(
"
http://192.168.8.126:5000/logout
"
,
)
.
then
(
function
(
response
)
{
const
stngobj
=
JSON
.
stringify
(
response
.
data
)
console
.
log
(
stngobj
+
"
logged out
"
);
console
.
log
(
"
Successfully logged out
"
);
// alert("Successfully Logged out")
navigation
.
navigate
(
"
SignIn
"
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login failed
"
)
})}
/
>
);
},
...
...
@@ -99,6 +116,18 @@ export function AuthStack({ navigation }) {
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
axios
.
get
(
"
http://192.168.8.126:5000/logout
"
,
)
.
then
(
function
(
response
)
{
const
stngobj
=
JSON
.
stringify
(
response
.
data
)
console
.
log
(
stngobj
+
"
logged out
"
);
console
.
log
(
"
Successfully logged out
"
);
// alert("Successfully Logged out")
navigation
.
navigate
(
"
SignIn
"
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login failed
"
)
})}
/
>
);
},
...
...
@@ -115,6 +144,18 @@ export function AuthStack({ navigation }) {
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
axios
.
get
(
"
http://192.168.8.126:5000/logout
"
,
)
.
then
(
function
(
response
)
{
const
stngobj
=
JSON
.
stringify
(
response
.
data
)
console
.
log
(
stngobj
+
"
logged out
"
);
console
.
log
(
"
Successfully logged out
"
);
// alert("Successfully Logged out")
navigation
.
navigate
(
"
SignIn
"
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
Login failed
"
)
})}
/
>
);
},
...
...
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