Browse Source

tela de contato criada com sucesso, boraaaaa programador master kkkkkkkk

Adroaldolucas 2 weeks ago
parent
commit
304a49c387
5 changed files with 146 additions and 0 deletions
  1. 6 0
      app/_layout.jsx
  2. 44 0
      app/contato.jsx
  3. 44 0
      app/email.jsx
  4. 50 0
      app/galeria.jsx
  5. 2 0
      leiame.md

+ 6 - 0
app/_layout.jsx

@@ -28,6 +28,12 @@ export default function layout(){
                 
             })}
             />
+             <Stack.Screen name="contato"
+            options={({route})=>({
+                title:"Voltar à galeria",
+                
+            })}
+            />
     </Stack>
     )
 }

+ 44 - 0
app/contato.jsx

@@ -0,0 +1,44 @@
+import { Link } from "expo-router";
+import { useState } from "react";
+import {Button, Text, TouchableOpacity, View} from "react-native";
+import {useRouter} from "expo-router"
+
+export default function Contato(){
+    const router = useRouter()
+   const [mensagem, setMensagem ] = useState("")
+
+   function irParaHome()
+   {
+    if(router.canDismiss()){
+        router.dismissAll();
+    }
+    router.push("/")
+   }
+   
+
+   return (
+    <View style={{flex:1, padding:20}}>
+        <View style={{flex:1, gap:10}}>
+            <Text style= {{ fontSize:24, }}>Contato</Text>
+            
+            <Button Style = {{Backgroundcolor: "red"}}
+                title="Enviar mensagem!!"
+                onPress={()=> setMensagem("Mensagem eviada com sucesso!!!")
+                    
+                }/>
+            <Text>{mensagem}</Text>
+                
+        </View>
+        <View style={{ 
+            flex:1,
+            justifyContent: 'flex-end',
+            gap: 10
+         }}>
+            
+           <Button title = "Ir para home"
+           onPress={irParaHome}/>   
+            
+        </View>    
+    </View>
+   )
+}

+ 44 - 0
app/email.jsx

@@ -0,0 +1,44 @@
+import { Link } from "expo-router";
+import { useState } from "react";
+import {Button, Text, TouchableOpacity, View} from "react-native";
+import {useRouter} from "expo-router"
+
+export default function Contato(){
+    const router = useRouter()
+   const [mensagem, setMensagem ] = useState("")
+
+   function irParaHome()
+   {
+    if(router.canDismiss()){
+        router.dismissAll();
+    }
+    router.push("/")
+   }
+   
+
+   return (
+    <View style={{flex:1, padding:20}}>
+        <View style={{flex:1, gap:10}}>
+            <Text style= {{ fontSize:24, }}>Contato</Text>
+            
+            <Button Style = {{Backgroundcolor: "red"}}
+                title="Enviar mensagem!!"
+                onPress={()=> setMensagem("Mensagem eviada com sucesso!!!")
+                    
+                }/>
+            <Text>{mensagem}</Text>
+                
+        </View>
+        <View style={{ 
+            flex:1,
+            justifyContent: 'flex-end',
+            gap: 10
+         }}>
+            
+           <Button title = "Ir para home"
+           onPress={irParaHome}/>   
+            
+        </View>    
+    </View>
+   )
+}

+ 50 - 0
app/galeria.jsx

@@ -0,0 +1,50 @@
+import { View, Text, TextInput } from 'react-native'
+import React, { useState } from 'react'
+import { Link } from 'expo-router'
+
+export default function Profile() {
+    const [nome, setNome] = useState("")
+  return (
+    <View style={{
+        flex:1,
+        backgroundColor:'#ddd',
+        
+        fontSize:24
+    }}>
+        <View Style={{ flex: 1}}>
+            <TextInput style={{
+                height:40,
+                padding:10
+            }}
+            placeholder='Digite seu nome'
+            value={nome}
+            onChangeText={setNome}
+        />
+        <Text style={{
+            fontSize:24
+        }}>
+            Olá, {nome || "visitante"}
+        </Text>
+        </View>
+        <View style = {{ 
+            flex:1,
+            justifyContent: 'flex-end'
+        }}>
+            <Link
+                href="/contato"
+                style={{
+                    padding:10,
+                    backgroundColor: 'black',
+                    borderRadius:5,
+                    alignItems: 'center',
+                    textAlign: 'center',
+                    color: 'white',
+                    
+                }}>
+                    <Text>Ir para Contato </Text>
+                </Link>
+
+        </View>
+    </View>
+  )
+}

+ 2 - 0
leiame.md

@@ -19,4 +19,6 @@ Comando para rodar o aplicativo:
 💡
 ```bash
 npx expo start
+
+npm install
 ```