diff --git a/src/navigation/BottomTabNavigator.tsx b/src/navigation/BottomTabNavigator.tsx index 508d82f280d0aa2598b2578cb0f98dae9cefef8e..f4d60b1bb64abff0b63f454d881fa9ad4acdc625 100644 --- a/src/navigation/BottomTabNavigator.tsx +++ b/src/navigation/BottomTabNavigator.tsx @@ -5,6 +5,7 @@ import TabOneScreen from "../screens/TabOneScreen"; import { FontAwesome } from "@expo/vector-icons"; import { Pressable } from "react-native"; import Colors from "../constants/Colors"; +import ProfileStackNavigator from "./ProfileStackNavigator"; /** * A bottom tab navigator displays tab buttons on the bottom of the display to switch screens. @@ -43,6 +44,30 @@ const BottomTabNavigator = () => { ), })} /> + ) => ({ + title: "Profile", + headerShown: false, + tabBarIcon: ({ color }) => , + headerRight: () => ( + null} + style={({ pressed }) => ({ + opacity: pressed ? 0.5 : 1, + })} + > + + + ), + })} + /> ); }; diff --git a/src/navigation/ProfileStackNavigator.tsx b/src/navigation/ProfileStackNavigator.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e4ea33d9751d0f6ed541a7d6947dba610d7ada65 --- /dev/null +++ b/src/navigation/ProfileStackNavigator.tsx @@ -0,0 +1,40 @@ +import { createNativeStackNavigator } from "@react-navigation/native-stack"; +import React from "react"; +import { StyleSheet } from "react-native"; +import AccountSettingsScreen from "../screens/profile/AccountSettingsScreen"; +import ChangePasswordScreen from "../screens/profile/ChangePasswordScreen"; +import ProfileScreen from "../screens/profile/ProfileScreen"; +import { ProfileStackParamList } from "../types/navigation/ProfileStack"; + +const ProfileStack = createNativeStackNavigator(); + +const AuthStackNavigator = () => { + return ( + + + + + + + ); +}; + +// const styles = StyleSheet.create({ +// header: { +// shadow +// } +// }) + +export default AuthStackNavigator; diff --git a/src/navigation/RootNavigator.tsx b/src/navigation/RootNavigator.tsx index 97ed412ca5fad03037ab73f06a305ed297ea4e4f..221ec51326d0f323f608a2d85ed020847f830c76 100644 --- a/src/navigation/RootNavigator.tsx +++ b/src/navigation/RootNavigator.tsx @@ -3,6 +3,7 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack"; import BottomTabNavigator from "./BottomTabNavigator"; import { RootStackParamList } from "../types/navigation"; import AuthStackNavigator from "./AuthStackNavigator"; +import ProfileStackNavigator from "./ProfileStackNavigator"; /** * A root stack navigator is often used for displaying modals on top of all other content. diff --git a/src/screens/profile/AccountSettingsScreen.tsx b/src/screens/profile/AccountSettingsScreen.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b2bf01d570fe0af40a6f8310839892d52dd527c7 --- /dev/null +++ b/src/screens/profile/AccountSettingsScreen.tsx @@ -0,0 +1,43 @@ +import { useNavigation } from "@react-navigation/core"; +import * as React from "react"; +import { Button, StyleSheet } from "react-native"; +import { TouchableOpacity } from "react-native-gesture-handler"; + +import { Text, View } from "../../components/Themed"; +import Colors from "../../constants/Colors"; +import { RootTabScreenProps } from "../../types/navigation"; + +export default function AccountSettingsScreen({ + navigation, +}: RootTabScreenProps<"Profile">) { + const nav = useNavigation(); + return ( + + {/* nav.navigate("ChangePassword")}> + Ganti Password + */} +