| Línea 7... |
Línea 7... |
| 7 |
import FormErrorFeedback from "../../../../shared/form-error-feedback/FormErrorFeedback";
|
7 |
import FormErrorFeedback from "../../../../shared/form-error-feedback/FormErrorFeedback";
|
| 8 |
import Recaptcha from "react-recaptcha";
|
8 |
import Recaptcha from "react-recaptcha";
|
| 9 |
import Spinner from "../../../../shared/loading-spinner/Spinner";
|
9 |
import Spinner from "../../../../shared/loading-spinner/Spinner";
|
| 10 |
import { Link } from "react-router-dom";
|
10 |
import { Link } from "react-router-dom";
|
| 11 |
import CryptoJSAesJson from "../../../../utils/crypto-js/cryptojs-aes-format";
|
11 |
import CryptoJSAesJson from "../../../../utils/crypto-js/cryptojs-aes-format";
|
| - |
|
12 |
import SwitchInput from "../../../../account-settings/account-settings/shared/switch-input/SwitchInput";
|
| Línea 12... |
Línea 13... |
| 12 |
|
13 |
|
| 13 |
const StyledCheck = styled.div`
|
14 |
const StyledCheck = styled.div`
|
| 14 |
display: flex;
|
15 |
display: flex;
|
| 15 |
flex-direction: column;
|
16 |
flex-direction: column;
|
| Línea 39... |
Línea 40... |
| 39 |
|
40 |
|
| 40 |
const { register, handleSubmit, setError, errors, watch } = useForm({ mode: 'onBlur' });
|
41 |
const { register, handleSubmit, setError, errors, watch } = useForm({ mode: 'onBlur' });
|
| 41 |
const [termsChecked, setTermsChecked] = useState(false);
|
42 |
const [termsChecked, setTermsChecked] = useState(false);
|
| 42 |
const [registered, setRegistered] = useState(false);
|
43 |
const [registered, setRegistered] = useState(false);
|
| - |
|
44 |
const [isLoading, setIsLoading] = useState(false);
|
| Línea 43... |
Línea 45... |
| 43 |
const [isLoading, setIsLoading] = useState(false);
|
45 |
const [isAdult, setIsAdult] = useState(false);
|
| 44 |
|
46 |
|
| 45 |
// Recaptcha
|
47 |
// Recaptcha
|
| 46 |
const [isVerified, setIsVerified] = useState(false);
|
48 |
const [isVerified, setIsVerified] = useState(false);
|
| Línea 72... |
Línea 74... |
| 72 |
if (key === "email" || key === "password" || key === "confirmation")
|
74 |
if (key === "email" || key === "password" || key === "confirmation")
|
| 73 |
return formData.append(key, CryptoJSAesJson.encrypt(value, aes))
|
75 |
return formData.append(key, CryptoJSAesJson.encrypt(value, aes))
|
| 74 |
return formData.append(key, value);
|
76 |
return formData.append(key, value);
|
| 75 |
})
|
77 |
})
|
| 76 |
formData.append("captcha", reCaptchaToken.current);
|
78 |
formData.append("captcha", reCaptchaToken.current);
|
| - |
|
79 |
formData.append("is_adult", isAdult ? 'y' : 'n');
|
| Línea 77... |
Línea 80... |
| 77 |
|
80 |
|
| 78 |
await axios.post("/signup", formData)
|
81 |
await axios.post("/signup", formData)
|
| 79 |
.then(({ data }) => {
|
82 |
.then(({ data }) => {
|
| 80 |
if (!data.success) {
|
83 |
if (!data.success) {
|
| Línea 228... |
Línea 231... |
| 228 |
<i className="la la-lock" />
|
231 |
<i className="la la-lock" />
|
| 229 |
</div>
|
232 |
</div>
|
| 230 |
{errors.confirmation && <FormErrorFeedback>{errors.confirmation.message}</FormErrorFeedback>}
|
233 |
{errors.confirmation && <FormErrorFeedback>{errors.confirmation.message}</FormErrorFeedback>}
|
| 231 |
</div>
|
234 |
</div>
|
| 232 |
</div>
|
235 |
</div>
|
| - |
|
236 |
<div className="col-lg-12 no-pdd">
|
| - |
|
237 |
<div className="inputContainer">
|
| - |
|
238 |
<div className="sn-field">
|
| - |
|
239 |
<SwitchInput setValue={(value) => setIsAdult(value)} />
|
| - |
|
240 |
<i className="la la-lock" />
|
| - |
|
241 |
</div>
|
| - |
|
242 |
{errors.confirmation && <FormErrorFeedback>{errors.confirmation.message}</FormErrorFeedback>}
|
| - |
|
243 |
</div>
|
| - |
|
244 |
</div>
|
| Línea 233... |
Línea 245... |
| 233 |
|
245 |
|
| 234 |
<div className="col-lg-12 no-pdd">
|
246 |
<div className="col-lg-12 no-pdd">
|
| 235 |
<div className="inputContainer">
|
247 |
<div className="inputContainer">
|
| 236 |
<div className="checky-sec st2">
|
248 |
<div className="checky-sec st2">
|