about summary refs log tree commit diff
path: root/src/routes/types.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-06-09 16:32:03 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-06-09 16:32:03 -0500
commitfc3b2952bb59b80665ebb53ffb3377f647ccdbd3 (patch)
tree37477c0803459ff55f0e26ae27c8231305e6856a /src/routes/types.ts
parentd6942bffab68ce80d5cb26b42710dd9276f62ded (diff)
downloadvoidsky-fc3b2952bb59b80665ebb53ffb3377f647ccdbd3.tar.zst
Add routes and core views
Diffstat (limited to 'src/routes/types.ts')
-rw-r--r--src/routes/types.ts24
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>
+  >