about summary refs log tree commit diff
path: root/src/routes/types.ts
blob: 88148fd4db5beea5f2ddaf1e3c8d8f425fddee55 (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
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}
  Login: undefined
  Signup: undefined
  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>
  >