function DrawerNavigator() {
return (
<NavigationContainer>
<Drawer.Navigator
initialRouteName="Home"
drawerContent={props => {
const filteredProps = {
...props,
state: {
...props.state,
routeNames: props.state.routeNames.filter(routeName => {
routeName !== 'Home';
}),
routes: props.state.routes.filter(route => route.name !== 'Home'),
},
};
return (
<DrawerContentScrollView {...filteredProps}>
<DrawerItemList {...filteredProps} />
</DrawerContentScrollView>
);
}}>
<Drawer.Screen name="Notifications" component={ProfileScreen} />
<Drawer.Screen name="Notifications2" component={ProfileScreen} />
<Drawer.Screen name="Home" component={StackNavigator} />
</Drawer.Navigator>
</NavigationContainer>
);
}