-
Notifications
You must be signed in to change notification settings - Fork 0
/
Profile.tsx
36 lines (34 loc) · 1.03 KB
/
Profile.tsx
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
import { useAppSelector } from "../../../store/hooks";
import { selectUser } from "../../../store/slices/user.slice";
import Default from "./Default";
import { RootStackParamList } from "../../../interfaces/RootStackParamList.interface";
import { createStackNavigator } from "@react-navigation/stack";
import UpdateField from "../../../pages/UpdateField";
export default function Profile() {
const Stack = createStackNavigator();
const userState = useAppSelector(selectUser);
return (
userState && (
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen
name={"Default" as keyof RootStackParamList}
component={Default as any}
initialParams={{
current: 'profile'
}}
/>
<Stack.Screen
name={"UpdateField" as keyof RootStackParamList}
component={UpdateField as any}
initialParams={{
current: 'profile/update'
}}
/>
</Stack.Navigator>
)
);
}