From f74c5397817ed09f2930c3947d5338ef6611ef2d Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Mon, 22 Aug 2022 00:51:05 -0600 Subject: [PATCH] scrollview y pasar params del usuario --- mobile-ui/App.js | 10 +++--- mobile-ui/components/Home.js | 8 +++++ mobile-ui/components/Profile.js | 60 ++++++++++++++++++++++++++------- 3 files changed, 60 insertions(+), 18 deletions(-) diff --git a/mobile-ui/App.js b/mobile-ui/App.js index a1ca6178..95065cf4 100644 --- a/mobile-ui/App.js +++ b/mobile-ui/App.js @@ -24,18 +24,18 @@ function HomeTab({route}) { const [selected, setSelected] = useState(0); const user = route.params; -console.log(user); +// console.log(user); return ( - - + (} color="#D7A86E" size="md" />)}} onclick={() => setSelected(0)} /> - (} color="#D7A86E" size="md" />)} } onclick={() => setSelected(1)} /> - (} color="#D7A86E" size="md" />)}} onclick={() => setSelected(2)} /> diff --git a/mobile-ui/components/Home.js b/mobile-ui/components/Home.js index ab60fb52..86769edb 100644 --- a/mobile-ui/components/Home.js +++ b/mobile-ui/components/Home.js @@ -6,6 +6,7 @@ import { Box, Pressable, Spacer, + ScrollView } from "native-base"; import { MaterialCommunityIcons } from '@expo/vector-icons'; export default function Home(){ @@ -14,6 +15,12 @@ export default function Home(){ return ( + + console.log("I'm Pressed")} rounded="8" overflow="hidden" borderWidth="1" borderColor="coolGray.300" maxW="96" shadow="3" bg="coolGray.100" p="5" marginTop="4"> @@ -58,6 +65,7 @@ export default function Home(){ + //
diff --git a/mobile-ui/components/Profile.js b/mobile-ui/components/Profile.js index 28239557..e17e35e0 100644 --- a/mobile-ui/components/Profile.js +++ b/mobile-ui/components/Profile.js @@ -4,24 +4,32 @@ import { Box, Heading, VStack, - FormControl, - Input, + FormControl, Button, - Center + Center, + ScrollView } from "native-base"; + import { View, TextInput, StyleSheet } from "react-native"; + export default function Profile({route, navigation}){ - const user = route.params; + const userData = JSON.parse(JSON.stringify(route.params)); - console.log(user); + console.log(userData.user); return (
+ + - Katoikia + Bienvenido {userData.user.name} + + DNI + + Nombre - + - Correo Electrónico - + Apellido + - Teléfono - + Correo electrónico + Contraseña actual - + + +
) -} \ No newline at end of file + + +} + +const styles = StyleSheet.create({ + input: { + height: 10, + margin:3, + borderWidth: 0.5, + padding: 5, + flex: 1, + paddingTop: 9, + paddingRight: 19, + paddingBottom: 20, + paddingLeft: 0, + marginTop: 6, + marginBottom:6, + borderRadius: 4 + } + }) +