response-navigation 5.0 - Ящики на каждой стороне экрана - PullRequest
0 голосов
/ 28 апреля 2020

Я пытаюсь получить ящики с каждой стороны экрана.

Однако я не могу открыть один справа.

Я пытался использовать метод openDrawer () так же как и опасно GetParent () метод. OpenDrawer (), но ничего не работает.

Вот код, который я написал:

const UserDrawer = createDrawerNavigator()
const UserMenu = () => (
  <UserDrawer.Navigator
    drawerType="slide"
    overlayColor="rgba(49, 70, 111, 0.75)"
    drawerPosition="right"
    >
    <UserDrawer.Screen name="Profile" component={Profile}/>
    <UserDrawer.Screen name="Company" component={Company}/>
  </UserDrawer.Navigator>
)

const DashboardDrawer = createDrawerNavigator()
const DashboardMenu = () => (
  <DashboardDrawer.Navigator
    drawerType="slide"
    overlayColor="rgba(49, 70, 111, 0.75)"
    drawerPosition="left"
    initialRouteName="Dashboard"
    >
    <DashboardDrawer.Screen name="Dashboard" component={Dashboard}/>
    <DashboardDrawer.Screen name="Enterprise" component={Enterprise}/>
    <DashboardDrawer.Screen name="Cases" component={Cases}/>
    <DashboardDrawer.Screen name="Customers" component={Customers}/>
    <DashboardDrawer.Screen name="Unpaid" component={Unpaid}/>
    <DashboardDrawer.Screen name="Payments" component={Payments}/>
    <DashboardDrawer.Screen name="Recommendations" component={Recommendations}/>
    <DashboardDrawer.Screen name="UserNavigation" component={UserNavigation}/>
  </DashboardDrawer.Navigator>
)

const AppStack = createStackNavigator()
const AppNavigation = () => (
  <AppStack.Navigator headerMode="none">
    <AppStack.Screen name="Home" component={HomeNavigation} />
    <AppStack.Screen name="Dashboard" component={DashboardNavigation} />
  </AppStack.Navigator>
)

const AppNavigationContainer = () => (
  <NavigationContainer>
    <AppNavigation />
  </NavigationContainer>
)

Спасибо за вашу помощь.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...