Navigation.ts
1.34 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
import { CompositeNavigationProp, RouteProp } from '@react-navigation/native';
import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs';
import { StackNavigationProp } from '@react-navigation/stack';
export type MainTabParamList = {
Library: undefined;
SystemInfo: undefined;
DesignList: undefined;
Me: undefined;
};
export type MainStackParamList = {
MainTab: { screen?: keyof MainTabParamList };
RNDeviceInfoList: undefined;
WebviewScreen: { uri: string } | undefined;
RNLocalize: undefined;
RNCamera: undefined;
RNCode: undefined;
ShortcutItem: { id?: string };
RNDialogs: undefined;
};
export type AuthStackParamList = {
Login: undefined;
};
export type MainTabScreenProps<RouteName extends keyof MainTabParamList> = {
navigation: CompositeNavigationProp<
BottomTabNavigationProp<MainTabParamList, RouteName>,
StackNavigationProp<MainStackParamList>
>;
route: RouteProp<MainTabParamList, RouteName>;
};
export type MainStackScreenProps<RouteName extends keyof MainStackParamList> = {
navigation: StackNavigationProp<MainStackParamList, RouteName>;
route: RouteProp<MainStackParamList, RouteName>;
};
export type AuthStackScreenProps<RouteName extends keyof AuthStackParamList> = {
navigation: StackNavigationProp<AuthStackParamList, RouteName>;
route: RouteProp<AuthStackParamList, RouteName>;
};