Commit b6c12647 authored by pramod.nichelabs's avatar pramod.nichelabs

skipped login

parent 07cca18d
......@@ -25,7 +25,7 @@ export function AuthStack({ navigation }) {
<Stack.Navigator>
<Stack.Screen
name="SignIn"
component={SignIn}
component={HomeScreen}
options={{
// headerLeft: () => {
// return (
......
......@@ -60,7 +60,7 @@ export function SignIn({ navigation }) {
}
};
const form = new FormData ();
form.append("email", data.email)
......@@ -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);
axios.defaults.headers.common = {
authorization : 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
// }
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}/> */}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment