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