diff --git a/packages/web-ui-registration/src/LoginForm.tsx b/packages/web-ui-registration/src/LoginForm.tsx index 24ad530f50155..2bcbcae41a436 100644 --- a/packages/web-ui-registration/src/LoginForm.tsx +++ b/packages/web-ui-registration/src/LoginForm.tsx @@ -93,11 +93,15 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute if (loginFormRef.current) { loginFormRef.current.focus(); } - }, [errorOnSubmit]); + }, []); const renderErrorOnSubmit = (error: LoginErrors) => { const { type, i18n } = LOGIN_SUBMIT_ERRORS[error]; - return {t(i18n)}; + return ( + + {t(i18n)} + + ); }; if (errors.username?.type === 'invalid-email') { @@ -177,11 +181,7 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute )} - {errorOnSubmit && ( - - {renderErrorOnSubmit(errorOnSubmit)} - - )} + {errorOnSubmit && {renderErrorOnSubmit(errorOnSubmit)}}