|
@@ -2,18 +2,18 @@ import React from 'react'
|
|
|
import * as Yup from 'yup';
|
|
import * as Yup from 'yup';
|
|
|
import { useState } from 'react';
|
|
import { useState } from 'react';
|
|
|
import { useFormik, Form, FormikProvider } from 'formik';
|
|
import { useFormik, Form, FormikProvider } from 'formik';
|
|
|
-import { useNavigate } from 'react-router-dom';
|
|
|
|
|
|
|
+// import { useNavigate } from 'react-router-dom';
|
|
|
import { Icon } from '@iconify/react';
|
|
import { Icon } from '@iconify/react';
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
Stack, TextField, IconButton, InputAdornment,
|
|
Stack, TextField, IconButton, InputAdornment,
|
|
|
- Button, Backdrop, CircularProgress,
|
|
|
|
|
|
|
+ Backdrop, CircularProgress,
|
|
|
} from '@mui/material';
|
|
} from '@mui/material';
|
|
|
|
|
|
|
|
import eyeFill from '@iconify/icons-eva/eye-fill';
|
|
import eyeFill from '@iconify/icons-eva/eye-fill';
|
|
|
import eyeOffFill from '@iconify/icons-eva/eye-off-fill';
|
|
import eyeOffFill from '@iconify/icons-eva/eye-off-fill';
|
|
|
-import toast, { Toaster } from 'react-hot-toast';
|
|
|
|
|
-import { V1, V2 } from '../../Utils/HTTP'
|
|
|
|
|
|
|
+import { Toaster } from 'react-hot-toast';
|
|
|
|
|
+// import { V1, V2 } from '../../Utils/HTTP'
|
|
|
|
|
|
|
|
export function RegisterForm() {
|
|
export function RegisterForm() {
|
|
|
|
|
|
|
@@ -24,7 +24,7 @@ export function RegisterForm() {
|
|
|
setOpen(false);
|
|
setOpen(false);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- let navigate = useNavigate()
|
|
|
|
|
|
|
+ // let navigate = useNavigate()
|
|
|
|
|
|
|
|
const RegisterSchema = Yup.object().shape({
|
|
const RegisterSchema = Yup.object().shape({
|
|
|
firstName: Yup.string()
|
|
firstName: Yup.string()
|
|
@@ -63,8 +63,9 @@ export function RegisterForm() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let url = 'http://204.48.25.93:8081/registro'
|
|
let url = 'http://204.48.25.93:8081/registro'
|
|
|
|
|
+ console.log(body, url)
|
|
|
// let url = 'http://psicoadmin.ditca.org:8081/registro'
|
|
// let url = 'http://psicoadmin.ditca.org:8081/registro'
|
|
|
- V1(url, body);
|
|
|
|
|
|
|
+ // V1(url, body);
|
|
|
// V2(url, body);
|
|
// V2(url, body);
|
|
|
setOpen(false)
|
|
setOpen(false)
|
|
|
//
|
|
//
|
|
@@ -75,7 +76,7 @@ export function RegisterForm() {
|
|
|
const { errors, touched, handleSubmit, getFieldProps } = formik;
|
|
const { errors, touched, handleSubmit, getFieldProps } = formik;
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <FormikProvider value={formik}>
|
|
|
|
|
|
|
+ <FormikProvider style={{ padding : 15 }} value={formik}>
|
|
|
<Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
|
<Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
|
|
<Stack spacing={3}>
|
|
<Stack spacing={3}>
|
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
|
|
@@ -143,13 +144,17 @@ export function RegisterForm() {
|
|
|
helperText={touched.password_confirm && errors.password_confirm}
|
|
helperText={touched.password_confirm && errors.password_confirm}
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <Button
|
|
|
|
|
- type="submit"
|
|
|
|
|
- size="large"
|
|
|
|
|
- style={{ backgroundColor : '#d32f2f'}}
|
|
|
|
|
- variant="contained" >
|
|
|
|
|
- Registrarme
|
|
|
|
|
- </Button>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {/*
|
|
|
|
|
+ <Button
|
|
|
|
|
+ type="submit"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ style={{ backgroundColor : '#d32f2f'}}
|
|
|
|
|
+ variant="contained" >
|
|
|
|
|
+ Registrarme
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ */
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
</Stack>
|
|
</Stack>
|
|
|
</Form>
|
|
</Form>
|