mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 21:48:15 -05:00
5b6bbcb73c
[web] Migrate notifications and error boundaries on the editor page GitOrigin-RevId: c195ecf0dd9e38ec8326c823174e559e1f192ce1
15 lines
423 B
TypeScript
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>
|
|
)
|
|
}
|