-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathroot-param-list.ts
More file actions
39 lines (35 loc) · 1.01 KB
/
root-param-list.ts
File metadata and controls
39 lines (35 loc) · 1.01 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
/**
* Param lists mirror the static `screens` map in `root/root-navigator.tsx`.
* Kept here (not `StaticParamList<typeof RootStack>`) to avoid a circular import:
* navigator → screens → e.g. StoryScreen → this module.
*/
import { ROUTES } from '@/navigation/routes'
export type StoryScreenParams = {
id: string
title: string
url?: string
points?: number
author?: string
numComments?: number
time: string
domain?: string
}
/** Bottom tab navigator screens. */
export type HomeTabParamList = {
[ROUTES.TAB_HOME]: undefined
[ROUTES.TAB_SETTINGS]: undefined
}
/** Root stack: onboarding, auth, main app shell, and global modals. */
export type RootStackParamList = {
[ROUTES.ROOT_APP]: undefined
[ROUTES.ROOT_AUTH]: undefined
[ROUTES.ROOT_ONBOARDING]: undefined
[ROUTES.HOME_STORY]: StoryScreenParams
[ROUTES.MODAL_THEME_PICKER]: undefined
[ROUTES.MODAL_LANGUAGE_PICKER]: undefined
}
declare global {
namespace ReactNavigation {
interface RootParamList extends RootStackParamList {}
}
}