From 800ccc51142916684ec3c6fcec371112323895ab Mon Sep 17 00:00:00 2001 From: Elsa <112454286+ekh88@users.noreply.github.com> Date: Sat, 6 Jul 2024 14:11:16 -0500 Subject: [PATCH] CHE-190 linting fixes --- .../src/pages/RegistrationPage/RegistrationPage.tsx | 12 +++++------- server/controllers/userController.ts | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) 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' && (