forked from anthonyazrak/acGen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStackNavigation.js
More file actions
49 lines (44 loc) · 1.33 KB
/
StackNavigation.js
File metadata and controls
49 lines (44 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { Button } from "react-native";
import { auth, logOut } from "./services/firebase";
import SavedScreen from "./screens/SavedScreen";
import DetailsScreen from "./screens/DetailsScreen";
import { TouchableOpacity } from "react-native";
const SavedStack = createStackNavigator();
const logout = async (navigation) => {
await logOut();
navigation.navigate("SignIn");
};
const SavedStackScreen = ({ navigation }) => (
<SavedStack.Navigator
screenOptions={{
headerStyle: {
backgroundColor: "#0052ff", // Set the header background color
},
headerTintColor: "#fff", // Set the text color in the header
headerTitleStyle: {
fontWeight: "bold",
},
}}
>
<SavedStack.Screen
name="Saved"
component={SavedScreen}
options={{
title: "Saved Activities", // Set the title in the header
headerRight: () => (
<TouchableOpacity
onPress={() => logout(navigation)}
title="Log Out"
color={"#fff"}
// color="#fff"
/>
),
headerLeft: null,
}}
/>
{/* <SavedStack.Screen name="Details" component={DetailsScreen} /> */}
</SavedStack.Navigator>
);
export default SavedStackScreen;