error-boundary.tsx 359 B

123456789101112
  1. import { ComponentType, FC } from 'react'
  2. import withErrorBoundary from '@/infrastructure/error-boundary'
  3. const FallbackComponent: FC = () => {
  4. return <>An error occurred within the test container</>
  5. }
  6. export const withTestContainerErrorBoundary = function <T>(
  7. Component: ComponentType<T>
  8. ) {
  9. return withErrorBoundary(Component, FallbackComponent)
  10. }