diff --git a/packages/ui/src/containers/EmailForm/EmailForm.test.tsx b/packages/ui/src/containers/EmailForm/EmailForm.test.tsx
index fa26bc460..6f19a56b1 100644
--- a/packages/ui/src/containers/EmailForm/EmailForm.test.tsx
+++ b/packages/ui/src/containers/EmailForm/EmailForm.test.tsx
@@ -70,7 +70,7 @@ describe('', () => {
});
test('should display and clear the form error message as expected', () => {
- const { queryByText, container, getByText } = renderWithPageContext(
+ const { queryByText, container } = renderWithPageContext(
{
- // eslint-disable-next-line @silverhand/fp/no-mutation
- errorMessageRef.current = errorMessage;
- }, [errorMessage]);
-
- useEffect(() => {
- if (errorMessageRef.current) {
- clearErrorMessage?.();
- }
- }, [clearErrorMessage, errorMessageRef, fieldValue.email]);
-
const onSubmitHandler = useCallback(
async (event?: React.FormEvent) => {
event?.preventDefault();
@@ -75,6 +61,8 @@ const EmailForm = ({
[validateForm, hasTerms, termsValidation, onSubmit, fieldValue.email]
);
+ const { onChange, ...rest } = register('email', emailValidation);
+
return (