Skip to content

Commit

Permalink
feat: Adding buttons to follow conventions of other views
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiorodriguezgarcia committed Mar 4, 2024
1 parent b9b0c65 commit f8eecc9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webapp/src/pages/Signup.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Center } from "@chakra-ui/layout";
import { Heading, Input, Button, InputGroup, Stack, InputLeftElement, chakra, Box, Avatar, FormControl, InputRightElement, Text, FormHelperText } from "@chakra-ui/react";
import { ViewIcon, ViewOffIcon } from '@chakra-ui/icons'
import axios, { HttpStatusCode } from "axios";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { FaUserAlt, FaLock, FaAddressCard } from "react-icons/fa";
import ButtonEf from '../components/ButtonEf';

export default function Signup() {
const [email, setEmail] = useState("");
Expand Down Expand Up @@ -104,7 +106,7 @@ export default function Signup() {
/>
<InputRightElement width="4.5rem">
<Button h="1.75rem" size="sm" onClick={() => setShowPassword(!showPassword)}>
{showPassword ? "Hide" : "Show"}
{showPassword ? <ViewOffIcon/> : <ViewIcon/>}
</Button>
</InputRightElement>
</InputGroup>
Expand All @@ -120,17 +122,15 @@ export default function Signup() {
/>
<InputRightElement width="4.5rem">
<Button h="1.75rem" size="sm" onClick={() => setShowConfirmPassword(!showConfirmPassword)}>
{showConfirmPassword ? "Hide" : "Show"}
{showConfirmPassword ? <ViewOffIcon/> : <ViewIcon/>}
</Button>
</InputRightElement>
</InputGroup>
{confirmPassword && password && confirmPassword !== password && (
<FormHelperText color="red">Las contraseñas no coinciden</FormHelperText>
)}
</FormControl>
<Button type="submit" variant="solid" colorScheme="blue" onClick={sendLogin}>
Sign Up
</Button>
<ButtonEf dataTestId={"Sign up"} variant={"solid"} colorScheme={"blue"} text={t("common.register")} onClick={sendLogin}/>
</Stack>
</Box>
</Stack>
Expand Down

0 comments on commit f8eecc9

Please sign in to comment.