fix drawer layout on mobile web (#9618)
This commit is contained in:
+11
-3
@@ -5,7 +5,6 @@ import {i18n, type MessageDescriptor} from '@lingui/core'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {
|
||||
type BottomTabBarProps,
|
||||
type BottomTabNavigatorProps,
|
||||
createBottomTabNavigator,
|
||||
} from '@react-navigation/bottom-tabs'
|
||||
import {
|
||||
@@ -637,7 +636,11 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
|
||||
* The TabsNavigator is used by native mobile to represent the routes
|
||||
* in 3 distinct tab-stacks with a different root screen on each.
|
||||
*/
|
||||
function TabsNavigator({layout}: {layout: BottomTabNavigatorProps['layout']}) {
|
||||
function TabsNavigator({
|
||||
layout,
|
||||
}: {
|
||||
layout: React.ComponentProps<typeof Tab.Navigator>['layout']
|
||||
}) {
|
||||
const tabBar = useCallback(
|
||||
(props: JSX.IntrinsicAttributes & BottomTabBarProps) => (
|
||||
<BottomBar {...props} />
|
||||
@@ -759,7 +762,11 @@ function MessagesTabNavigator() {
|
||||
* The FlatNavigator is used by Web to represent the routes
|
||||
* in a single ("flat") stack.
|
||||
*/
|
||||
const FlatNavigator = () => {
|
||||
const FlatNavigator = ({
|
||||
layout,
|
||||
}: {
|
||||
layout: React.ComponentProps<typeof Flat.Navigator>['layout']
|
||||
}) => {
|
||||
const t = useTheme()
|
||||
const numUnread = useUnreadNotifications()
|
||||
const screenListeners = useWebScrollRestoration()
|
||||
@@ -767,6 +774,7 @@ const FlatNavigator = () => {
|
||||
|
||||
return (
|
||||
<Flat.Navigator
|
||||
layout={layout}
|
||||
screenListeners={screenListeners}
|
||||
screenOptions={screenOptions(t)}>
|
||||
<Flat.Screen
|
||||
|
||||
Reference in New Issue
Block a user