Update react native screens, remove patch (#9210)
* update react native screens * bump rns * see if nightly works * update nightly * yay it's out * update react-nav * update drawer layout and remove patch * Update createNativeStackNavigatorWithAuth.tsx * render drawer as "layout" component * rm react-nav/drawer (unused) * restore drawer layout patch
This commit is contained in:
@@ -50,11 +50,13 @@ type NativeStackNavigationOptionsWithAuth = NativeStackNavigationOptions & {
|
||||
function NativeStackNavigator({
|
||||
id,
|
||||
initialRouteName,
|
||||
UNSTABLE_routeNamesChangeBehavior,
|
||||
children,
|
||||
layout,
|
||||
screenListeners,
|
||||
screenOptions,
|
||||
screenLayout,
|
||||
UNSTABLE_router,
|
||||
...rest
|
||||
}: NativeStackNavigatorProps) {
|
||||
// --- this is copy and pasted from the original native stack navigator ---
|
||||
@@ -68,11 +70,13 @@ function NativeStackNavigator({
|
||||
>(StackRouter, {
|
||||
id,
|
||||
initialRouteName,
|
||||
UNSTABLE_routeNamesChangeBehavior,
|
||||
children,
|
||||
layout,
|
||||
screenListeners,
|
||||
screenOptions,
|
||||
screenLayout,
|
||||
UNSTABLE_router,
|
||||
})
|
||||
|
||||
React.useEffect(
|
||||
@@ -169,7 +173,7 @@ function NativeStackNavigator({
|
||||
|
||||
export function createNativeStackNavigatorWithAuth<
|
||||
const ParamList extends ParamListBase,
|
||||
const NavigatorID extends string | undefined = undefined,
|
||||
const NavigatorID extends string | undefined = string | undefined,
|
||||
const TypeBag extends NavigatorTypeBagBase = {
|
||||
ParamList: ParamList
|
||||
NavigatorID: NavigatorID
|
||||
|
||||
@@ -91,14 +91,19 @@ function ShellInner() {
|
||||
}
|
||||
}, [dedupe, navigation])
|
||||
|
||||
const drawerLayout = useCallback(
|
||||
({children}: {children: React.ReactNode}) => (
|
||||
<DrawerLayout>{children}</DrawerLayout>
|
||||
),
|
||||
[],
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<View style={[a.h_full]}>
|
||||
<ErrorBoundary
|
||||
style={{paddingTop: insets.top, paddingBottom: insets.bottom}}>
|
||||
<DrawerLayout>
|
||||
<TabsNavigator />
|
||||
</DrawerLayout>
|
||||
<TabsNavigator layout={drawerLayout} />
|
||||
</ErrorBoundary>
|
||||
</View>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user