about summary refs log tree commit diff
path: root/src/view/routes/types.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-07-18 15:24:37 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-07-18 15:24:37 -0500
commit1d00f3b9840003601175d5394af34b29222db4e3 (patch)
treef835e910d5f11b84ce2403e307caea080c34ab79 /src/view/routes/types.ts
parentde87ec17d1673855fdfe2ccd125d734591969dd4 (diff)
downloadvoidsky-1d00f3b9840003601175d5394af34b29222db4e3.tar.zst
Add mock API and reorg code for clarity
Diffstat (limited to 'src/view/routes/types.ts')
-rw-r--r--src/view/routes/types.ts36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/view/routes/types.ts b/src/view/routes/types.ts
new file mode 100644
index 000000000..d92594bbe
--- /dev/null
+++ b/src/view/routes/types.ts
@@ -0,0 +1,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>
+  >
+*/