overleaf/services/web/frontend/js/shared/components/error-boundary-fallback.tsx
Rebeka a412f3d70e Add error boundary to the project dashboard list
GitOrigin-RevId: 0f4cc3b4db62efe25ceeff202f305d08ddd73968
2023-07-17 10:24:38 +00:00

15 lines
382 B
TypeScript

import { FC, ReactNode } from 'react'
import { Alert } from 'react-bootstrap'
import { DefaultMessage } from './default-message'
export const ErrorBoundaryFallback: FC<{ modal?: ReactNode }> = ({
children,
modal,
}) => {
return (
<div className="error-boundary-alert">
<Alert bsStyle="danger">{children || <DefaultMessage />}</Alert>
{modal}
</div>
)
}