overleaf/services/web/frontend/js/shared/components/error-boundary-fallback.tsx
Rebeka Dekany 5b6bbcb73c Merge pull request #21008 from overleaf/rd-editor-errors
[web] Migrate notifications and error boundaries on the editor page

GitOrigin-RevId: c195ecf0dd9e38ec8326c823174e559e1f192ce1
2024-10-14 11:09:36 +00:00

15 lines
423 B
TypeScript

import { FC, ReactNode } from 'react'
import { DefaultMessage } from './default-message'
import OLNotification from '@/features/ui/components/ol/ol-notification'
export const ErrorBoundaryFallback: FC<{ modal?: ReactNode }> = ({
children,
modal,
}) => {
return (
<div className="error-boundary-alert">
<OLNotification type="error" content={children || <DefaultMessage />} />
{modal}
</div>
)
}