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.
BOB_PARTY/bob_party/src/screens/Chat.tsx

36 lines
1.1 KiB

import { StatusBar } from 'expo-status-bar'
import {View} from 'react-native'
import React from 'react';
import stylesScreen from './style/screens.style';
import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler';
import { ConversationComponent } from '../components/ConversationComponent';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
function Chat(props: { navigation: any; }) {
const { navigation } = props
const currentUser = useSelector((state: RootState) => state.currentUser.value[0]);
return (
<View style={stylesScreen.container}>
<TopBar
nav={navigation}
/>
<View style={stylesScreen.bodyStart}>
<FlatList
data={currentUser.getTabConv()}
renderItem={({item}) => <ConversationComponent conv={item} state='Preview'/>}
/>
</View>
<BotBar
nav={navigation}
state='Chat'
/>
</View>
);
}
export default Chat