overleaf-cep/services/web/test/frontend/helpers/error-boundary.tsx
Tim Down 5d78229e1e Merge pull request #25093 from overleaf/td-upgrade-react-error-boundary-second-attempt
Upgrade react-error-boundary to version 5, second attempt

GitOrigin-RevId: 2b88334b66f0ace383211c147279ff88e9f956bb
2025-04-29 08:06:23 +00:00

12 lines
359 B
TypeScript

import { ComponentType, FC } from 'react'
import withErrorBoundary from '@/infrastructure/error-boundary'
const FallbackComponent: FC = () => {
return <>An error occurred within the test container</>
}
export const withTestContainerErrorBoundary = function <T>(
Component: ComponentType<T>
) {
return withErrorBoundary(Component, FallbackComponent)
}