{"size": 1844, "ext": "js", "max_stars_repo_path": "frontend/components/messages/Messages.js", "max_stars_repo_name": "lartiorkor/dateX", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/components/messages/Messages.js", "max_issues_repo_name": "lartiorkor/dateX", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/components/messages/Messages.js", "max_forks_repo_name": "lartiorkor/dateX", "max_forks_repo_forks_event_min_datetime": "2021-06-21T22:55:22.000Z", "max_forks_repo_forks_event_max_datetime": "2021-06-21T22:55:22.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 19.8279569892, "max_line_length": 106, "alphanum_fraction": 0.5422993492}
import React, {useState} from 'react';
import {View, Text, FlatList, StyleSheet, TextBase} from 'react-native';
import ChatListItem from '../chatlistitem/ChatListItem';
import ThemeContext from '../context/ThemeContext';

const DATA = [
  {
    id: 'bd7acbea',
    title: 'First Item',
  },
  {
    id: '3ac68afc',
    title: 'Second Item',
  },
  {
    id: '58694a0f',
    title: 'Third Item',
  },
  {
    id: 'bd7acbez',
    title: 'First Item',
  },
  {
    id: '3ac68afd',
    title: 'Second Item',
  },
  {
    id: '58694a0e',
    title: 'Third Item',
  },
  {
    id: 'bd7acbek',
    title: 'First Item',
  },
  {
    id: '3ac68afr',
    title: 'Second Item',
  },
  {
    id: '58694a01',
    title: 'Third Item',
  },
  {
    id: 'bd7acbe0',
    title: 'First Item',
  },
  {
    id: '3ac68afm',
    title: 'Second Item',
  },
  {
    id: '58694a08',
    title: 'Third Item',
  },
];

const Messages = ({navigation}) => {
  const [users, setUsers] = useState([]);
  const {currentTheme} = React.useContext(ThemeContext);
  return (
    <View style={styles.main}>
      {/* <View style={{borderBottomWidth: 0.5, paddingBottom: 5, borderColor: currentTheme.tabInactive}}>
        <Text style={{fontWeight: 'bold', color: currentTheme.txtColor, marginLeft: 10}}>Messages</Text>
      </View> */}
      <View style={styles.container}>
        <FlatList
          data={DATA}
          renderItem={({item}) => (
            <ChatListItem
              message={item.title}
              navigation={navigation}
              identifier={item.id}
            />
          )}
          keyExtractor={item => item.id}
          showsVerticalScrollIndicator={false}
        />
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    paddingTop: 10,
  },
  main: {
    flex: 1,
  },
});

export default Messages;
