You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChatAndPolls.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @flow
  2. import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
  3. import React from 'react';
  4. import { useSelector } from 'react-redux';
  5. import { Chat } from '../..';
  6. import {
  7. getClientHeight,
  8. getClientWidth
  9. } from '../../../base/modal/components/functions.native';
  10. import { screen } from '../../../mobile/navigation/routes';
  11. import { chatTabBarOptions } from '../../../mobile/navigation/screenOptions';
  12. import { PollsPane } from '../../../polls/components';
  13. const ChatTab = createMaterialTopTabNavigator();
  14. const ChatAndPolls = () => {
  15. const clientHeight = useSelector(getClientHeight);
  16. const clientWidth = useSelector(getClientWidth);
  17. return (
  18. <ChatTab.Navigator
  19. backBehavior = 'none'
  20. initialLayout = {{
  21. height: clientHeight,
  22. width: clientWidth
  23. }}
  24. screenOptions = { chatTabBarOptions }>
  25. <ChatTab.Screen
  26. component = { Chat }
  27. name = { screen.conference.chatandpolls.tab.chat } />
  28. <ChatTab.Screen
  29. component = { PollsPane }
  30. name = { screen.conference.chatandpolls.tab.polls } />
  31. </ChatTab.Navigator>
  32. );
  33. };
  34. export default ChatAndPolls;