Commit 6faadbd5 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se movió el boton de la página al formulario

parent 34f5169a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
import { Control, Controller, FieldValues } from "react-hook-form";
import { ScrollView, StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { Button, ScrollView, StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { CustomTextInput } from "../../common/components/form/text_input";
import { LIGHT_THEME } from "../../common/constants/theme";
import { LoginFormValues } from "../hooks/useLoggin";
import { OrDivision } from "../../common/components/form/or_division";
import { AntDesign } from '@expo/vector-icons';
import { Link } from "expo-router";
import { Link, router } from "expo-router";
import { useTranslation } from "react-i18next";
import { LanguageIcon } from "../../lang/components/language_icon";

@@ -70,7 +70,7 @@ export const LoginForm = ({ control, onSubmit }: LoginFormProps) => {
            )}
            rules={{ required: "Password is required" }}
          />
          <Link href={'/sign_up'} replace style={{width: '100%', textAlign: 'right'}}>
          <Link href={'/auth/reset_password'} replace style={{width: '100%', textAlign: 'right'}}>
            <Text style={{textDecorationLine:'underline'}}>
              Recuperar contraseña
            </Text>
@@ -81,6 +81,8 @@ export const LoginForm = ({ control, onSubmit }: LoginFormProps) => {
          </TouchableOpacity>

          <OrDivision/>

          <Button title={LANG.t('loginScreen.registerButton')}  onPress={() => router.replace('/sign_up')}/>
        </ScrollView>
    );
}
+4 −0
Original line number Diff line number Diff line
import { Control, Controller, useForm } from "react-hook-form";
import {
  Button,
  ScrollView,
  StyleSheet,
  Text,
@@ -12,6 +13,7 @@ import { useLoggin } from "../hooks/useLoggin";
import { OrDivision } from "../../common/components/form/or_division";
import { SignUpFormValues, useSignUp } from "../hooks/useSignUp";
import { DateTextInput } from "../../common/components/form/date_text_input";
import { router } from "expo-router";

interface SignUpFormProps {
  control: Control<SignUpFormValues, any>;
@@ -164,6 +166,8 @@ export const SignUpForm = ({ control, onSubmit }: SignUpFormProps) => {
      </TouchableOpacity>

      <OrDivision/>

      <Button title="Login" onPress={() => router.replace('/login')}/>
    </ScrollView>
  );
};