diff --git a/client/src/pages/RegistrationPage/RegistrationPage.tsx b/client/src/pages/RegistrationPage/RegistrationPage.tsx index 9432429..034a095 100644 --- a/client/src/pages/RegistrationPage/RegistrationPage.tsx +++ b/client/src/pages/RegistrationPage/RegistrationPage.tsx @@ -33,13 +33,11 @@ const RegistrationPage = () => { console.error('Token is missing.'); setRegistrationError('token'); // return; //TODO Display error feedback for user - } - ; //TODO User feedback needed if (formData.password !== formData.password2) { - setRegistrationError('passwords do not match') - }; + setRegistrationError('passwords do not match'); + } try { const response = await fetch(`/api/users/register?token=${token}`, { method: 'POST', @@ -50,7 +48,7 @@ const RegistrationPage = () => { }); const data = await response.json(); if (!response.ok) { - setRegistrationError('general') + setRegistrationError('general'); throw new Error(data.message || 'An error occurred during registration.'); } @@ -134,13 +132,13 @@ const RegistrationPage = () => { )} {registrationError === 'general' && (