jiti-meet/react/features/mobile/navigation/components/chat/components/ChatAndPollsNavigationConta...

44 lines
1.3 KiB
JavaScript
Raw Normal View History

// @flow
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
import React from 'react';
import { useSelector } from 'react-redux';
import {
getClientHeight,
getClientWidth
2022-01-25 12:55:57 +00:00
} from '../../../../../base/modal/components/functions.native';
import { Chat } from '../../../../../chat';
import { PollsPane } from '../../../../../polls/components';
import { screen } from '../../../routes';
import { chatTabBarOptions } from '../../../screenOptions';
const ChatTab = createMaterialTopTabNavigator();
2022-01-25 12:55:57 +00:00
const ChatAndPollsNavigationContainer = () => {
const clientHeight = useSelector(getClientHeight);
const clientWidth = useSelector(getClientWidth);
return (
<ChatTab.Navigator
backBehavior = 'none'
initialLayout = {{
height: clientHeight,
width: clientWidth
}}
screenOptions = {{
...chatTabBarOptions
}}>
<ChatTab.Screen
component = { Chat }
name = { screen.conference.chatandpolls.tab.chat } />
<ChatTab.Screen
component = { PollsPane }
name = { screen.conference.chatandpolls.tab.polls } />
</ChatTab.Navigator>
);
};
2022-01-25 12:55:57 +00:00
export default ChatAndPollsNavigationContainer;