|
@@ -0,0 +1,51 @@
|
|
|
+import { Button, Text, TextInput, TouchableOpacity, View } from "react-native";
|
|
|
+import { useState } from "react";
|
|
|
+import { useRouter } from 'expo-router';
|
|
|
+
|
|
|
+
|
|
|
+export default function Contato() {
|
|
|
+ const router = useRouter();
|
|
|
+ const [mensagem, setMensagem] = useState("")
|
|
|
+ const [final, setFinal] = useState("Enviada")
|
|
|
+
|
|
|
+
|
|
|
+ function irParaHome() {
|
|
|
+ if(router.canDismiss) {
|
|
|
+ router.dismissAll();
|
|
|
+ }
|
|
|
+ router.push("/");
|
|
|
+ }
|
|
|
+ function enviarMensagem() {
|
|
|
+ setFinal(`
|
|
|
+ Mensagem Enviada com Sucesso!\n
|
|
|
+ ${mensagem}
|
|
|
+ `)
|
|
|
+ }
|
|
|
+
|
|
|
+ return (
|
|
|
+ <View style={{flex: 1, padding: 20}}>
|
|
|
+ <View style={{flex: 1}} >
|
|
|
+ <Text style={{fontSize: 24}}>
|
|
|
+ Contato
|
|
|
+ </Text>
|
|
|
+ <TextInput placeholder="Digite a mensagem" value={mensagem} onChangeText={setMensagem}/>
|
|
|
+
|
|
|
+ <Button title="Enviar Mensagem" onPress={enviarMensagem}></Button>
|
|
|
+ <Text>{final}</Text>
|
|
|
+
|
|
|
+
|
|
|
+ <View style={{flex: 1, justifyContent: "flex-end", gap: 10}}>
|
|
|
+ <TouchableOpacity style={{backgroundColor: "#f4511e", padding: 10, marginTop: 10}} onPress={irParaHome}>
|
|
|
+ <Text style={{ padding: 10, textAlign: "center"}}>Voltar para Home</Text>
|
|
|
+ </TouchableOpacity>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|