mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 14:00:05 +02:00

Upgrade react-error-boundary to version 5, second attempt GitOrigin-RevId: 2b88334b66f0ace383211c147279ff88e9f956bb
12 lines
359 B
TypeScript
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)
|
|
}
|