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
b6c12647
Commit
b6c12647
authored
Nov 24, 2021
by
pramod.nichelabs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skipped login
parent
07cca18d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
Navigations/AuthStack.js
Navigations/AuthStack.js
+1
-1
screen/SignIn.js
screen/SignIn.js
+19
-20
No files found.
Navigations/AuthStack.js
View file @
b6c12647
...
...
@@ -25,7 +25,7 @@ export function AuthStack({ navigation }) {
<
Stack
.
Navigator
>
<
Stack
.
Screen
name
=
"
SignIn
"
component
=
{
SignI
n
}
component
=
{
HomeScree
n
}
options
=
{{
// headerLeft: () => {
// return (
...
...
screen/SignIn.js
View file @
b6c12647
...
...
@@ -126,27 +126,26 @@ export function SignIn({ navigation }) {
<
TouchableOpacity
style
=
{
styles
.
buttonSub
}
activeOpacity
=
{
0.5
}
onPress
=
{
()
=>
axios
.
post
(
"
http://192.168.8.126:5000/login
"
,
form
)
.
then
(
async
function
(
response
)
{
// const stngobj = JSON.stringify()
console
.
log
(
response
.
data
);
// alert("Successfully Logged in");
await
SecureStore
.
setItemAsync
(
"
token
"
,
response
.
data
.
token
);
onPress
=
{
()
=>
navigation
.
navigate
(
"
HomeScreen
"
)
}
//
axios.post("http://192.168.8.126:5000/login", form)
//
.then( async function (response) {
//
// const stngobj = JSON.stringify()
//
console.log(response.data);
//
// alert("Successfully Logged in");
//
await SecureStore.setItemAsync("token", response.data.token);
axios
.
defaults
.
headers
.
common
=
{
authorization
:
response
.
data
.
token
}
//
axios.defaults.headers.common = {
//
authorization : response.data.token
//
}
navigation
.
navigate
(
"
HomeScreen
"
)
//
navigation.navigate("HomeScreen")
// return response;
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
alert
(
"
No User Existed
"
)
})
}
// // return response;
// })
// .catch(function (error) {
// console.log(error);
// alert("No User Existed")
// })
>
<
Text
style
=
{
styles
.
buttonTextStyle
}
>
LOGIN
<
/Text
>
{
/* <ImageBackground source={require('../assets/loginex.jpg')} style={styles.imagebutton}/> */
}
...
...
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