APP-70 give profile its own tab mobile (#469)
* add prebuild command to package.json * add ProfileTab navigator and screen * add prop to remove back button from profile * fix MyProfileTabNavigatorParams type * fix dep array for rendering ProfileHeader * just added ts-ignore * enable opening drawer in profile tab * clean up useNavigationTabState * clean up code * fix hideBackButton code flow
This commit is contained in:
parent
2509290fdd
commit
10621e86e4
10 changed files with 128 additions and 51 deletions
|
@ -20,7 +20,8 @@ export function isStateAtTabRoot(state: State | undefined) {
|
|||
return (
|
||||
isTab(currentRoute.name, 'Home') ||
|
||||
isTab(currentRoute.name, 'Search') ||
|
||||
isTab(currentRoute.name, 'Notifications')
|
||||
isTab(currentRoute.name, 'Notifications') ||
|
||||
isTab(currentRoute.name, 'MyProfile')
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ export type {NativeStackScreenProps} from '@react-navigation/native-stack'
|
|||
export type CommonNavigatorParams = {
|
||||
NotFound: undefined
|
||||
Settings: undefined
|
||||
Profile: {name: string}
|
||||
Profile: {name: string; hideBackButton?: boolean}
|
||||
ProfileFollowers: {name: string}
|
||||
ProfileFollows: {name: string}
|
||||
PostThread: {name: string; rkey: string}
|
||||
|
@ -21,6 +21,13 @@ export type CommonNavigatorParams = {
|
|||
CopyrightPolicy: undefined
|
||||
}
|
||||
|
||||
export type BottomTabNavigatorParams = CommonNavigatorParams & {
|
||||
HomeTab: undefined
|
||||
SearchTab: undefined
|
||||
NotificationsTab: undefined
|
||||
MyProfileTab: undefined
|
||||
}
|
||||
|
||||
export type HomeTabNavigatorParams = CommonNavigatorParams & {
|
||||
Home: undefined
|
||||
}
|
||||
|
@ -33,6 +40,10 @@ export type NotificationsTabNavigatorParams = CommonNavigatorParams & {
|
|||
Notifications: undefined
|
||||
}
|
||||
|
||||
export type MyProfileTabNavigatorParams = CommonNavigatorParams & {
|
||||
MyProfile: undefined
|
||||
}
|
||||
|
||||
export type FlatNavigatorParams = CommonNavigatorParams & {
|
||||
Home: undefined
|
||||
Search: {q?: string}
|
||||
|
@ -46,6 +57,7 @@ export type AllNavigatorParams = CommonNavigatorParams & {
|
|||
Search: {q?: string}
|
||||
NotificationsTab: undefined
|
||||
Notifications: undefined
|
||||
MyProfileTab: undefined
|
||||
}
|
||||
|
||||
// NOTE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue