import React, { useState } from "react";
import { FlatList, StyleSheet, View, Text } from "react-native";
import Screen from "../components/Screen";
import {
ListItem,
ListItemDeleteAction,
ListItemSeparator,
} from "../components/lists";
import colors from "../config/colors";
import { AntDesign } from '@expo/vector-icons';
/*const initialMessages = [
{
id: 1,
title: "Defesa Civil",
description: "Enviado um aviso de chuvas intensas na região do M'Boi Mirim. Há possibilidade ...",
image: require("../assets/defesa_civil.png"),
},
{
id: 2,
title: "Defesa Civil",
description:
"Enviado um aviso de alagamento na região de Pinheiros. Há possibilidade de alagamentos. Evite a região.",
image: require("../assets/defesa_civil.png"),
},
];*/
function MessagesScreen(props) {
/*const [messages, setMessages] = useState(initialMessages);
const [refreshing, setRefreshing] = useState(false);
const handleDelete = (message) => {
setMessages(messages.filter((m) => m.id !== message.id));
}; */
return (
{/*
message.id.toString()}
renderItem={({ item }) => (
console.log("Message selected", item)}
renderRightActions={() => (
handleDelete(item)} />
)}
/>
)}
ItemSeparatorComponent={ListItemSeparator}
refreshing={refreshing}
onRefresh={() => {
setMessages([
{
id: 2,
title: "T2",
description: "D2",
image: require("../assets/ddangelorb.png"),
},
]);
}}
/>
*/},
Em construção...
);
}
const styles = StyleSheet.create({
screen: {
backgroundColor: colors.light,
},
container: {
flex: 1,
flexDirection: "column",
alignItems: "center",
justifyContent: "flex-start"
},
});
export default MessagesScreen;