import { ReactNode } from "react"; import { ErrorBoundary } from "react-error-boundary"; import StyledButton from "./styled/Button"; type FallbackProps = { error: Error; resetErrorBoundary: (...args: Array) => void; }; function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { return (

Something went wrong:

{error.message}
Try again
); } type Props = { children: ReactNode; }; const ErrorCatcher = ({ children }: Props) => { return {children}; }; export default ErrorCatcher;