fix: eslint issues

This commit is contained in:
Waheed Ahmed
2022-07-20 16:43:58 +05:00
committed by Waheed Ahmad
parent d4bfdf699b
commit f83c24c020
4 changed files with 5 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ const useMobileResponsive = (breakpoint) => {
window.addEventListener('resize', checkForMobile);
// return this function here to clean up the event listener
return () => window.removeEventListener('resize', checkForMobile);
}, []);
});
return isMobileWindow;
};

View File

@@ -45,10 +45,9 @@ const ResetPasswordPage = (props) => {
setErrorCode(props.status);
}
if (props.status === PASSWORD_VALIDATION_ERROR) {
formErrors.newPassword = intl.formatMessage(messages['password.validation.message']);
setFormErrors({ ...formErrors });
setFormErrors({ newPassword: intl.formatMessage(messages['password.validation.message']) });
}
}, [props.errorMsg]);
}, [props.status, intl]);
const validatePasswordFromBackend = async (password) => {
let errorMessage = '';

View File

@@ -58,7 +58,7 @@ const ProgressiveProfiling = (props) => {
setRegistrationResult(props.location.state.registrationResult);
sendPageEvent('login_and_registration', 'welcome');
}
}, []);
}, [DASHBOARD_URL, props.location.state]);
if (!props.location.state || !props.location.state.registrationResult || formRenderState === FAILURE_STATE) {
global.location.assign(DASHBOARD_URL);

View File

@@ -55,7 +55,7 @@ const WelcomePage = (props) => {
setRegistrationResult(props.location.state.registrationResult);
sendPageEvent('login_and_registration', 'welcome');
}
}, []);
}, [DASHBOARD_URL, props.location.state]);
if (!props.location.state || !props.location.state.registrationResult) {
global.location.assign(DASHBOARD_URL);