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"; ...@@ -11,6 +11,7 @@ import { gamification } from "../screen/gamification";
import { IotScreen } from "../screen/IotScreen"; import { IotScreen } from "../screen/IotScreen";
import { AboutUs } from "../screen/AboutUs"; import { AboutUs } from "../screen/AboutUs";
import axios from "axios"; import axios from "axios";
import HomeAuctionScreen from "../screen/Home.Auction.Screen";
const Stack = createStackNavigator(); const Stack = createStackNavigator();
...@@ -187,6 +188,34 @@ export function AuthStack({ navigation }) { ...@@ -187,6 +188,34 @@ export function AuthStack({ navigation }) {
}, },
}} }}
/> />
<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) {
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 <Stack.Screen
name="AboutUs" name="AboutUs"
component={AboutUs} component={AboutUs}
......
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