import React, { useContext } from 'react'; import { Image, SafeAreaView, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { Edit, Group, User, useTheme } from 'stream-chat-react-native'; import { AppContext } from '../context/AppContext'; import type { DrawerContentComponentProps } from '@react-navigation/drawer'; const styles = StyleSheet.create({ avatar: { borderRadius: 20, height: 40, width: 40, }, container: { flex: 1, }, menuContainer: { flex: 1, justifyContent: 'space-between', marginTop: 16, }, menuItem: { alignItems: 'center', flexDirection: 'row', paddingHorizontal: 16, paddingVertical: 12, }, menuTitle: { fontSize: 14, fontWeight: '500', marginLeft: 16, }, userName: { fontSize: 16, fontWeight: '600', marginLeft: 16, }, userRow: { alignItems: 'center', flexDirection: 'row', padding: 8, }, }); export const MenuDrawer: React.FC = ({ navigation }) => { const { theme: { colors: { black, grey, white }, }, } = useTheme(); const { chatClient, logout } = useContext(AppContext); if (!chatClient) return null; return ( {chatClient.user?.name} navigation.navigate('NewDirectMessagingScreen')} style={styles.menuItem} > New Direct Messages navigation.navigate('NewGroupChannelAddMemberScreen')} style={styles.menuItem} > New Group { logout(); }} style={styles.menuItem} > Sign Out ); };