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.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // @flow
  2. import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
  3. import React from 'react';
  4. import { useSelector } from 'react-redux';
  5. import {
  6. getClientHeight,
  7. getClientWidth
  8. } from '../../../base/modal/components/functions.native';
  9. import { Chat } from '../../../chat';
  10. import { chatTabBarOptions } from '../../../conference/components/native/ConferenceNavigatorScreenOptions';
  11. import { screen } from '../../../conference/components/native/routes';
  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. tabBarOptions = {{
  25. ...chatTabBarOptions
  26. }}>
  27. <ChatTab.Screen
  28. component = { Chat }
  29. name = { screen.conference.chatandpolls.tab.chat } />
  30. <ChatTab.Screen
  31. component = { PollsPane }
  32. name = { screen.conference.chatandpolls.tab.polls } />
  33. </ChatTab.Navigator>
  34. );
  35. };
  36. export default ChatAndPolls;