diff --git a/src/App.tsx b/src/App.tsx index a9f1048fd..187ab1921 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -244,7 +244,7 @@ export const App: React.FC = () => { setErrorMessage('')} + removeMessage={() => setErrorMessage('')} /> ); diff --git a/src/components/errorsUnderFooter.tsx b/src/components/errorsUnderFooter.tsx index b77f53872..5fbe52617 100644 --- a/src/components/errorsUnderFooter.tsx +++ b/src/components/errorsUnderFooter.tsx @@ -12,10 +12,10 @@ export function sendErrorMessage( type Props = { message: string; - clearMessage: () => void; + removeMessage: () => void; }; -export const ErrorMessage: React.FC = ({ message, clearMessage }) => { +export const ErrorMessage: React.FC = ({ message, removeMessage }) => { return (
= ({ message, clearMessage }) => { data-cy="HideErrorButton" type="button" className="delete" - onClick={clearMessage} + onClick={removeMessage} /> {message}