-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.tsx
More file actions
104 lines (94 loc) · 2.65 KB
/
types.tsx
File metadata and controls
104 lines (94 loc) · 2.65 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**
* Learn more about using TypeScript with React Navigation:
* https://reactnavigation.org/docs/typescript/
*/
import { BottomTabScreenProps } from '@react-navigation/bottom-tabs';
import {
CompositeScreenProps,
NavigatorScreenParams,
RouteProp
} from '@react-navigation/native';
import {
NativeStackNavigationProp,
NativeStackScreenProps
} from '@react-navigation/native-stack';
import { ILook } from './reducers/looks/looks';
import { IPost } from './reducers/posts/post';
import LooksForNewPostModal from './screens/Modals/LooksForNewPostModal';
declare global {
namespace ReactNavigation {
interface RootParamList extends RootStackParamList {}
}
}
export type RootStackParamList = {
Start: undefined;
Root: NavigatorScreenParams<RootTabParamList> | undefined;
ImageRecognizer: undefined;
Signup: undefined;
Login: undefined;
Edit: undefined;
AddItem: undefined;
NotFound: undefined;
CreateLook: undefined;
SaveLook: undefined;
EditLook: {
look: ILook;
id: number;
};
FinishEditLook: {
id: number;
};
Post: {
post: IPost;
};
Settings: undefined;
EditProfile: undefined;
ItemsByCategory: {
category: string;
};
ItemInWardrobe: {
id: number;
};
Item: {
id: number;
};
Look: {
id: number;
};
LooksForNewPost: undefined;
CreatePost: {
type: string;
id: number;
};
};
export type RootStackScreenProps<Screen extends keyof RootStackParamList> =
NativeStackScreenProps<RootStackParamList, Screen>;
export type RootTabParamList = {
Home: undefined;
Search: undefined;
Wardrobe: undefined;
Profile: undefined;
};
export type RootTabScreenProps<Screen extends keyof RootTabParamList> =
CompositeScreenProps<
BottomTabScreenProps<RootTabParamList, Screen>,
NativeStackScreenProps<RootStackParamList>
>;
export type RootNavigation = NativeStackNavigationProp<
RootStackParamList,
'Root'
>;
export type TapBarNavigation = NativeStackNavigationProp<
RootTabParamList,
'Home'
>;
export type ClothingByCategoryScreenRouteProp = RouteProp<
RootStackParamList,
'ItemsByCategory'
>;
export type SearchRouteProp = RouteProp<RootTabParamList, 'Search'>;
export type PostRouteProp = RouteProp<RootStackParamList, 'Post'>;
export type EditProfileProp = RouteProp<RootStackParamList, 'EditProfile'>;
export type ThingScreenRouteProp = RouteProp<RootStackParamList, 'Item'>;
export type LookRouteProp = RouteProp<RootStackParamList, 'Look'>;
export type CreatePostRouteProp = RouteProp<RootStackParamList, 'CreatePost'>;