From da533abd864eaab3d59556a56f830842e6622557 Mon Sep 17 00:00:00 2001 From: Vinicius Souza Date: Mon, 28 Oct 2024 11:24:14 -0300 Subject: [PATCH] feat: add state to sign up screen --- src/screens/SignUp.tsx | 122 +++++++++++++++++++++++------------------ 1 file changed, 69 insertions(+), 53 deletions(-) diff --git a/src/screens/SignUp.tsx b/src/screens/SignUp.tsx index dd06c55..9999d45 100644 --- a/src/screens/SignUp.tsx +++ b/src/screens/SignUp.tsx @@ -1,73 +1,89 @@ -import { Center, Heading, Image, ScrollView, Text, VStack } from "@gluestack-ui/themed"; -import { useNavigation } from "@react-navigation/native"; +import { useState } from 'react'; +import { Center, Heading, Image, ScrollView, Text, VStack } from '@gluestack-ui/themed'; +import { useNavigation } from '@react-navigation/native'; import BackgroundImg from '@assets/background.png'; import Logo from '@assets/logo.svg'; -import { Input } from "@components/Input"; -import { Button } from "@components/Button"; -import { AuthNavigatorRoutesProps } from "@routes/auth.routes"; + +import { AuthNavigatorRoutesProps } from '@routes/auth.routes'; + +import { Input } from '@components/Input'; +import { Button } from '@components/Button'; export function SignUp() { const navigation = useNavigation(); - const handleLogin = () => { - navigation.navigate('SignIn'); + const [name, setName] = useState(''); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const [confirmPassword, setConfirmPassword] = useState(''); + + function handleSignUp() { + console.debug({ + name, + email, + password, + confirmPassword, + }); } + const handleGoBack = () => { + navigation.navigate('SignIn'); + }; + return ( - - - Pessoas treinando + + + Pessoas treinando - -
- - - Treine a sua mente e o seu corpo - -
+ +
+ + + Treine a sua mente e o seu corpo + +
-
- - Crie sua a conta - +
+ Crie sua a conta - + - + - + -
+ -
+ +