about summary refs log tree commit diff
path: root/src/view/routes/types.ts
blob: d92594bbef9ead86e87145edc6c0343965aaa40b (plain) (blame)
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 type {StackScreenProps} from '@react-navigation/stack'

export type RootTabsParamList = {
  Home: undefined
  Search: undefined
  Notifications: undefined
  Menu: undefined
  Profile: {name: string}
  Login: undefined
  Signup: undefined
  NotFound: undefined
}
export type RootTabsScreenProps<T extends keyof RootTabsParamList> =
  StackScreenProps<RootTabsParamList, T>

/*
NOTE
this is leftover from a nested nav implementation
keeping it around for future reference
-prf

import type {NavigatorScreenParams} from '@react-navigation/native'
import type {CompositeScreenProps} from '@react-navigation/native'
import type {BottomTabScreenProps} from '@react-navigation/bottom-tabs'

Container: NavigatorScreenParams<PrimaryStacksParamList>
export type PrimaryStacksParamList = {
  Home: undefined
  Profile: {name: string}
}
export type PrimaryStacksScreenProps<T extends keyof PrimaryStacksParamList> =
  CompositeScreenProps<
    BottomTabScreenProps<PrimaryStacksParamList, T>,
    RootTabsScreenProps<keyof RootTabsParamList>
  >
*/