fix types once and for all
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import {View} from 'react-native'
|
||||
import {type ScreenLayoutArgs, useIsFocused} from '@react-navigation/native'
|
||||
import {type NativeStackNavigationProp} from '@react-navigation/native-stack'
|
||||
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
||||
|
||||
import {type AllNavigatorParams, type NavigationProp} from '#/lib/routes/types'
|
||||
import {type FlatNavigatorParams} from '#/lib/routes/types'
|
||||
import {type NativeStackNavigationOptionsWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
||||
import {atoms as a, useLayoutBreakpoints, useTheme, web} from '#/alf'
|
||||
import {useDialogControl} from '#/components/Dialog'
|
||||
import {NewChat} from '#/components/dms/dialogs/NewChatDialog'
|
||||
@@ -18,11 +20,21 @@ const LEFT_NAV_MINIMAL_WIDTH = 86
|
||||
const RIGHT_NAV_FULL_WIDTH = 330 + 28
|
||||
const RIGHT_NAV_MINIMAL_WIDTH = 280 + 28
|
||||
|
||||
type MessageScreens =
|
||||
| 'Messages'
|
||||
| 'MessagesConversation'
|
||||
| 'MessagesInbox'
|
||||
| 'MessagesSettings'
|
||||
|
||||
type LayoutProps = ScreenLayoutArgs<
|
||||
AllNavigatorParams,
|
||||
'Messages' | 'MessagesConversation' | 'MessagesInbox' | 'MessagesSettings',
|
||||
{},
|
||||
NavigationProp
|
||||
FlatNavigatorParams,
|
||||
MessageScreens,
|
||||
NativeStackNavigationOptionsWithAuth,
|
||||
NativeStackNavigationProp<
|
||||
FlatNavigatorParams,
|
||||
MessageScreens,
|
||||
string | undefined
|
||||
>
|
||||
>
|
||||
export function renderMessagesSplitViewLayout(props: LayoutProps) {
|
||||
return <MessagesSplitViewLayout {...props} />
|
||||
|
||||
@@ -46,9 +46,10 @@ import {DesktopRightNav} from './desktop/RightNav'
|
||||
// Older screens are unmounted to prevent memory growth during long sessions.
|
||||
const WEB_MAX_CACHED_SCREENS = 5
|
||||
|
||||
type NativeStackNavigationOptionsWithAuth = NativeStackNavigationOptions & {
|
||||
requireAuth?: boolean
|
||||
}
|
||||
export type NativeStackNavigationOptionsWithAuth =
|
||||
NativeStackNavigationOptions & {
|
||||
requireAuth?: boolean
|
||||
}
|
||||
|
||||
function NativeStackNavigator({
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user