diff options
Diffstat (limited to 'src/view/routes')
-rw-r--r-- | src/view/routes/index.tsx | 11 | ||||
-rw-r--r-- | src/view/routes/types.ts | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/view/routes/index.tsx b/src/view/routes/index.tsx index 6351dea6a..2d47a0470 100644 --- a/src/view/routes/index.tsx +++ b/src/view/routes/index.tsx @@ -16,7 +16,8 @@ import {Home} from '../screens/Home' import {Search} from '../screens/Search' import {Notifications} from '../screens/Notifications' import {Menu} from '../screens/Menu' -import {Profile} from '../screens/Profile' +import {Profile} from '../screens/content/Profile' +import {PostThread} from '../screens/content/PostThread' import {Login} from '../screens/Login' import {Signup} from '../screens/Signup' import {NotFound} from '../screens/NotFound' @@ -32,6 +33,7 @@ const linking: LinkingOptions<RootTabsParamList> = { screens: { Home: '', Profile: 'profile/:name', + PostThread: 'profile/:name/post/:recordKey', Search: 'search', Notifications: 'notifications', Menu: 'menu', @@ -42,7 +44,7 @@ const linking: LinkingOptions<RootTabsParamList> = { }, } -export const RootTabs = createBottomTabNavigator() +export const RootTabs = createBottomTabNavigator<RootTabsParamList>() export const PrimaryStack = createNativeStackNavigator() const tabBarScreenOptions = ({ @@ -92,6 +94,11 @@ export const Root = observer(() => { component={Profile} options={HIDE_TAB} /> + <RootTabs.Screen + name="PostThread" + component={PostThread} + options={HIDE_TAB} + /> </> ) : ( <> diff --git a/src/view/routes/types.ts b/src/view/routes/types.ts index d92594bbe..bca6f196a 100644 --- a/src/view/routes/types.ts +++ b/src/view/routes/types.ts @@ -6,6 +6,7 @@ export type RootTabsParamList = { Notifications: undefined Menu: undefined Profile: {name: string} + PostThread: {name: string; recordKey: string} Login: undefined Signup: undefined NotFound: undefined @@ -13,6 +14,8 @@ export type RootTabsParamList = { export type RootTabsScreenProps<T extends keyof RootTabsParamList> = StackScreenProps<RootTabsParamList, T> +export type OnNavigateContent = (screen: string, params: Record<string, string>): void + /* NOTE this is leftover from a nested nav implementation |