This commit is contained in:
Vitalii Kiiko
2024-09-27 12:51:29 +02:00
parent 478af11cb9
commit 4be858ca74
19 changed files with 580 additions and 292 deletions

View File

@@ -34,9 +34,12 @@ const Registration = () => {
const onSubmit = (formData) => {
errorMsgs.current.clear();
const temp_token = searchParams.get('temp_token');
setLoading(true);
AuthenticationService.registerUser(formData, regCallback, regError);
AuthenticationService.registerUser(formData, regCallback, regError, [
['tempToken', temp_token]
]);
};
const regCallback = (data) => {
@@ -106,7 +109,8 @@ const Registration = () => {
useEffect(() => {
const temp_token = searchParams.get('temp_token');
if (temp_token) {
if (temp_token && !isEmpty(temp_token)) {
AuthenticationService.validateNewUser(temp_token, validateCallback, validateError);
}
}, [searchParams]);