我下面的选项卡代码是底部选项卡导航器代码,我想通过渲染它在每个屏幕上显示它,就像app.js我对抽屉导航器所做的那样(简单地说,我想在屏幕上调用底部选项卡导航器)
const Stack = createStackNavigator();
const Drawer = createDrawerNavigator();
let user1=""
let data=""
export function DrwaerNav(props) {
if(props.route.params!=undefined){
console.log('props arent undefined')
user1=props.route.params.user.auth
data=props.route.params.user.auth
}
return (
<Drawer.Navigator initialRouteName="homeS" drawerContent={(props) => <DrawerContent props={props} data={user1}/>}
screenOptions={{
headerStyle:{
backgroundColor:'transparent',
},
headerTintColor:'black',
headerTitleStyle:{
fontWeight:'bold',
}
}}
>
<Drawer.Screen name="complaints" component={complaints}
options={{
title:'Home',
headerTitleAlign:'left',
headerRight:()=>(
<View style={{marginEnd:10,flexDirection:'row'}}>
<Text style={{paddingRight:15,paddingTop:13,fontWeight:"normal",}}>{user1.email}</Text>
<Avatar.Image
source={{ uri:base64.decode(user1.avatar)}}
size={40}
/>
{/* <Text>Email:{user1.email}</Text> */}
</View>
),
}}/>
<Drawer.Screen name="homeS" component={homeS} options={{
title:'Home',
headerTitleAlign:'left',
headerRight:()=>(
<View style={{marginEnd:10,flexDirection:'row'}}>
{/* <Text style={{paddingRight:15,paddingTop:13,fontWeight:"normal",fontSize:12,}}>{user1.email}</Text> */} …Run Code Online (Sandbox Code Playgroud)