2021-10-20 19:29:21 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
|
|
|
import React from 'react';
|
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
|
2022-05-06 10:14:10 +00:00
|
|
|
import { Chat } from '../..';
|
2021-10-20 19:29:21 +00:00
|
|
|
import {
|
|
|
|
getClientHeight,
|
|
|
|
getClientWidth
|
2022-05-06 10:14:10 +00:00
|
|
|
} from '../../../base/modal/components/functions.native';
|
|
|
|
import { screen } from '../../../mobile/navigation/routes';
|
|
|
|
import { chatTabBarOptions } from '../../../mobile/navigation/screenOptions';
|
|
|
|
import { PollsPane } from '../../../polls/components';
|
2021-10-20 19:29:21 +00:00
|
|
|
|
|
|
|
const ChatTab = createMaterialTopTabNavigator();
|
|
|
|
|
2022-05-06 10:14:10 +00:00
|
|
|
const ChatAndPolls = () => {
|
2021-10-20 19:29:21 +00:00
|
|
|
const clientHeight = useSelector(getClientHeight);
|
|
|
|
const clientWidth = useSelector(getClientWidth);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ChatTab.Navigator
|
|
|
|
backBehavior = 'none'
|
|
|
|
initialLayout = {{
|
|
|
|
height: clientHeight,
|
|
|
|
width: clientWidth
|
|
|
|
}}
|
2022-06-27 13:53:52 +00:00
|
|
|
screenOptions = { chatTabBarOptions }>
|
2021-10-20 19:29:21 +00:00
|
|
|
<ChatTab.Screen
|
|
|
|
component = { Chat }
|
|
|
|
name = { screen.conference.chatandpolls.tab.chat } />
|
|
|
|
<ChatTab.Screen
|
|
|
|
component = { PollsPane }
|
|
|
|
name = { screen.conference.chatandpolls.tab.polls } />
|
|
|
|
</ChatTab.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2022-05-06 10:14:10 +00:00
|
|
|
export default ChatAndPolls;
|