Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ChatAndPolls.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 BaseTheme from '../../../base/ui/components/BaseTheme.native';
  11. import { screen } from '../../../mobile/navigation/routes';
  12. import { chatTabBarOptions } from '../../../mobile/navigation/screenOptions';
  13. import { PollsPane } from '../../../polls/components';
  14. const ChatTab = createMaterialTopTabNavigator();
  15. const ChatAndPolls = () => {
  16. const clientHeight = useSelector(getClientHeight);
  17. const clientWidth = useSelector(getClientWidth);
  18. return (
  19. <ChatTab.Navigator
  20. backBehavior = 'none'
  21. initialLayout = {{
  22. height: clientHeight,
  23. width: clientWidth
  24. }}
  25. screenOptions = {{
  26. ...chatTabBarOptions,
  27. tabBarStyle: {
  28. backgroundColor: BaseTheme.palette.ui01
  29. }
  30. }}>
  31. <ChatTab.Screen
  32. component = { Chat }
  33. name = { screen.conference.chatandpolls.tab.chat } />
  34. <ChatTab.Screen
  35. component = { PollsPane }
  36. name = { screen.conference.chatandpolls.tab.polls } />
  37. </ChatTab.Navigator>
  38. );
  39. };
  40. export default ChatAndPolls;