Skip to content

Commit

Permalink
correct some request
Browse files Browse the repository at this point in the history
  • Loading branch information
Afonso-santos committed Nov 23, 2023
1 parent 3572dbd commit 6f1b9ef
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions apps/app/components/Signup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useState } from "react";
import Link from "next/link";
import {
Space,
Button,
Checkbox,
Form,
Input,
Radio,
Space,
Tooltip,
Typography,
} from "antd";
Expand All @@ -19,20 +19,16 @@ import { useAuth } from "@coderdojobraga/ui";

import styles from "./style.module.css";


function Signup() {
const { Title, Text } = Typography;
const { errors, isLoading, sign_up } = useAuth();

const [size, setSize] = useState("");

const handleSizeChange = (e: any) => {
setSize(e.target.value);
};

const onFinish = ({ email, password, role }: any) => {
sign_up({ email, password, role });

};

return (
Expand All @@ -50,7 +46,6 @@ function Signup() {
>
<Input prefix={<MailOutlined />} placeholder="Email" type="email" />
</Form.Item>

<Form.Item
name="password"
rules={[
Expand All @@ -75,28 +70,21 @@ function Signup() {
},
]}
>
<Radio.Group
value={size}
onChange={handleSizeChange}
>
<Radio.Group>
<Space direction="vertical">
<Radio value="guardian" className="mb-2">
Guardião
<label
id="mentor-description"
className="ml-2 text-gray-500"
>
id="mentor-description" className="ml-2 text-gray-500">
Responsável da criança.
</label>
</Radio>

<Radio value="mentor" className="mb-2">
Mentor
<label id="mentor-description" className="ml-5 text-gray-500">
Voluntário pela iniciativa.
</label>
</Radio>

<Tooltip
className={styles.option}
title="Inicia sessão como Guardião para inscreveres um Ninja"
Expand All @@ -112,7 +100,6 @@ function Signup() {
</Space>
</Radio.Group>
</Form.Item>

<Form.Item
name="terms"
valuePropName="checked"
Expand All @@ -137,7 +124,6 @@ function Signup() {
</Text>
</Checkbox>
</Form.Item>

<Form.Item
className={styles.button}
validateStatus={errors && "error"}
Expand All @@ -152,7 +138,6 @@ function Signup() {
Registar
</Button>
</Form.Item>

<Text>
Já tens uma conta?{" "}
<Link href="/dashboard/login">Inicia sessão aqui</Link>
Expand Down

0 comments on commit 6f1b9ef

Please sign in to comment.