diff options
Diffstat (limited to 'src/routes/types.ts')
-rw-r--r-- | src/routes/types.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/routes/types.ts b/src/routes/types.ts new file mode 100644 index 000000000..668dc2e2f --- /dev/null +++ b/src/routes/types.ts @@ -0,0 +1,24 @@ +import type {NavigatorScreenParams} from '@react-navigation/native' +import type {CompositeScreenProps} from '@react-navigation/native' +import type {StackScreenProps} from '@react-navigation/stack' +import type {BottomTabScreenProps} from '@react-navigation/bottom-tabs' + +export type RootStackParamList = { + Primary: undefined + Profile: {name: string} + NotFound: undefined +} +export type RootStackScreenProps<T extends keyof RootStackParamList> = + StackScreenProps<RootStackParamList, T> + +export type PrimaryTabParamList = { + Home: NavigatorScreenParams<RootStackParamList> + Search: undefined + Notifications: undefined + Menu: undefined +} +export type PrimaryTabScreenProps<T extends keyof PrimaryTabParamList> = + CompositeScreenProps< + BottomTabScreenProps<PrimaryTabParamList, T>, + RootStackScreenProps<keyof RootStackParamList> + > |