mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 07:25:10 -05:00
a412f3d70e
GitOrigin-RevId: 0f4cc3b4db62efe25ceeff202f305d08ddd73968
15 lines
382 B
TypeScript
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>
|
|
)
|
|
}
|