From 2316b12d4a9083c095000ed9fbd508e13f4a0cbd Mon Sep 17 00:00:00 2001 From: PedroSorriso Date: Thu, 7 Nov 2024 02:00:33 -0300 Subject: [PATCH] =?UTF-8?q?altera=C3=A7=C3=A3o=20da=20tela=20de=20prestado?= =?UTF-8?q?res?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/app/(extra)/prestador.tsx | 64 ++++++++++++++++++----- frontend/app/(extra)/servicoPrestador.tsx | 0 frontend/app/(tabs)/inicio.tsx | 41 +++++++++++++-- 3 files changed, 87 insertions(+), 18 deletions(-) create mode 100644 frontend/app/(extra)/servicoPrestador.tsx diff --git a/frontend/app/(extra)/prestador.tsx b/frontend/app/(extra)/prestador.tsx index 5a5ae5ad..c690353f 100644 --- a/frontend/app/(extra)/prestador.tsx +++ b/frontend/app/(extra)/prestador.tsx @@ -2,6 +2,7 @@ import { View, Text, ScrollView, TouchableOpacity, StyleSheet, Image, StatusBar} import React from 'react'; import { Ionicons } from '@expo/vector-icons'; import { useNavigation } from '@react-navigation/native'; +import { router } from 'expo-router'; const Prestadores = () => { @@ -17,33 +18,44 @@ const Prestadores = () => { { id: '6', nome: 'Sebastião', titulo: 'Instalação de Grama e Tapetes Verdes' }, ] - const prestadorClick = () =>{ - navigation.navigate(''); + const servicosPrestadorClick = () =>{ + router.navigate('/(extra)servicosPrestador'); + }; + const inicioClick =()=>{ + router.navigate('/(tabs)/inicio'); }; return( - {tipoPrestador.map(prestador => ( - + Nome:{prestador.nome} {prestador.titulo} - - - + + + + + Mais serviços + + + ))} @@ -64,7 +76,10 @@ const styles = StyleSheet.create({ borderBottomLeftRadius: 20, borderBottomRightRadius: 20, padding: 25, - marginBottom: 2, + marginBottom: 20, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', }, userText: { flexDirection: 'row', @@ -82,7 +97,7 @@ const styles = StyleSheet.create({ flexDirection: 'column', justifyContent: 'space-around', padding: 19, - height: 100, + height: 120, margin: 4, borderRadius: 10, }, @@ -90,6 +105,8 @@ const styles = StyleSheet.create({ flexDirection: 'row', width: 60, height: 60, + borderWidth: 1, + borderRadius: 10 }, nomePrestador:{ fontSize: 13, @@ -106,6 +123,25 @@ const styles = StyleSheet.create({ }, posicao:{ flexDirection: 'row' + }, + textServicos:{ + fontSize: 12, + fontWeight: 'bold', + + }, + botaoServicos:{ + backgroundColor: '#FFD700', + borderRadius: 5, + marginVertical: 10, + borderColor: 'black', + borderWidth: 1, + alignItems: 'center' + }, + centralTitulo:{ + margin:'auto', + flexDirection:'row', + alignItems:'center', + justifyContent:'center' } }); diff --git a/frontend/app/(extra)/servicoPrestador.tsx b/frontend/app/(extra)/servicoPrestador.tsx new file mode 100644 index 00000000..e69de29b diff --git a/frontend/app/(tabs)/inicio.tsx b/frontend/app/(tabs)/inicio.tsx index c9659fd6..3b199ba9 100644 --- a/frontend/app/(tabs)/inicio.tsx +++ b/frontend/app/(tabs)/inicio.tsx @@ -1,14 +1,17 @@ -import React from 'react'; -import { View, Text, ScrollView, StyleSheet, Pressable } from 'react-native'; +import React,{useState} from 'react'; +import { View, Text, ScrollView, StyleSheet, Pressable, TextInput } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; import { StatusBar } from 'expo-status-bar'; import { router } from 'expo-router'; +import Pesquisa from '../search/[query]'; +//import { useState } from 'react'; const Inicio = () => { const promocoes = [ { id: '1', titulo: 'Serviços de jardinagem', desconto: '20% de desconto' }, { id: '2', titulo: 'Reparo de celulares', desconto: '15% de desconto' }, ]; + const [searchText, setSearchText] = useState(''); const servicosFrequentes = [ { id: '1', descricao: 'Encanador', icon: 'construct-outline' }, @@ -49,6 +52,9 @@ const Inicio = () => { const pesquisaClick = () => { router.navigate('/(tabs)/perfil'); }; + const prestadorClick =() =>{ + router.navigate('/(extra)/prestador'); + } return ( @@ -63,9 +69,18 @@ const Inicio = () => { Olá, usuário! - O que você procura hoje? + + + + + {promocoes.map(promo => ( @@ -78,7 +93,7 @@ const Inicio = () => { Serviços frequentes {servicosFrequentes.map(servico => ( - + {servico.descricao} @@ -182,6 +197,24 @@ const styles = StyleSheet.create({ fontSize: 16, fontWeight: 'bold', }, + pesquisa:{ + flexDirection: 'row', + alignItems: 'center', + marginVertical: 10, + backgroundColor: '#f0f0f0', + borderRadius: 10, + paddingHorizontal: 10, + marginHorizontal: 20, + marginBottom: 20, + height: 40, + }, + iconPesquisa: { + marginRight: 10 + }, + textoPesquisa:{ + flex: 1, + fontSize: 16, + }, }); export default Inicio;