Commit 0900dbb7 authored by Pramodh Rajapakse's avatar Pramodh Rajapakse

auth stack auction screen nav added

parent af4c101f
......@@ -11,6 +11,7 @@ import { gamification } from "../screen/gamification";
import { IotScreen } from "../screen/IotScreen";
import { AboutUs } from "../screen/AboutUs";
import axios from "axios";
import HomeAuctionScreen from "../screen/Home.Auction.Screen";
const Stack = createStackNavigator();
......@@ -38,7 +39,7 @@ export function AuthStack({ navigation }) {
// headerRight: () => {
// return (
// <MaterialIcons name="logout"
// size={30}
// size={30}
// color="black"
// />
// );
......@@ -84,7 +85,7 @@ export function AuthStack({ navigation }) {
headerRight: () => {
return (
<MaterialIcons name="logout"
size={30}
size={30}
color="black"
onPress={() => axios.get("http://192.168.8.126:5000/logout", )
.then(function (response) {
......@@ -112,7 +113,7 @@ export function AuthStack({ navigation }) {
headerRight: () => {
return (
<MaterialIcons name="logout"
size={30}
size={30}
color="black"
onPress={() => axios.get("http://192.168.8.126:5000/logout", )
.then(function (response) {
......@@ -140,7 +141,7 @@ export function AuthStack({ navigation }) {
headerRight: () => {
return (
<MaterialIcons name="logout"
size={30}
size={30}
color="black"
onPress={() => axios.get("http://192.168.8.126:5000/logout", )
.then(function (response) {
......@@ -168,7 +169,35 @@ export function AuthStack({ navigation }) {
headerRight: () => {
return (
<MaterialIcons name="logout"
size={30}
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")
})}
/>
);
},
}}
/>
<Stack.Screen
name="auctionscreen"
component={HomeAuctionScreen}
options={{
title: "Auction Screen",
headerTitleAlign: "center",
headerRight: () => {
return (
<MaterialIcons name="logout"
size={30}
color="black"
onPress={() => axios.get("http://192.168.8.126:5000/logout", )
.then(function (response) {
......
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