diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx index bf26f7b3..eefa5fce 100644 --- a/src/pages/_error.tsx +++ b/src/pages/_error.tsx @@ -41,13 +41,15 @@ const errorMap = { }; const Error = ({ statusCode }) => { - const { onOpen, setNotificationText, setIsError } = + const { onOpen, isError, setNotificationText, setIsError } = useContext(FeedbackContext); useEffect(() => { - setIsError(true); - setNotificationText(getNotificationText(statusCode)); - }, [setIsError, setNotificationText, statusCode]); + if (!isError) { + setIsError(true); + setNotificationText(getNotificationText(statusCode)); + } + }, [isError, setIsError, setNotificationText, statusCode]); return (