mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-27 16:14:03 +00:00
Merge pull request #23692 from overleaf/em-history-errors
Move error boundary inside history container GitOrigin-RevId: cd4c911cef18b50cd4187f655e818c9ab851cfe0
This commit is contained in:
parent
b38c6eab7c
commit
ae491f910b
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
||||||
import { useLayoutContext } from '../../../shared/context/layout-context'
|
import { useLayoutContext } from '../../../shared/context/layout-context'
|
||||||
import { FullSizeLoadingSpinner } from '../../../shared/components/loading-spinner'
|
import { FullSizeLoadingSpinner } from '../../../shared/components/loading-spinner'
|
||||||
import { ErrorBoundaryFallback } from '../../../shared/components/error-boundary-fallback'
|
|
||||||
import withErrorBoundary from '../../../infrastructure/error-boundary'
|
|
||||||
import { lazy, Suspense } from 'react'
|
import { lazy, Suspense } from 'react'
|
||||||
|
|
||||||
const HistoryRoot = lazy(
|
const HistoryRoot = lazy(
|
||||||
|
@ -22,4 +20,4 @@ function HistoryContainer() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withErrorBoundary(HistoryContainer, ErrorBoundaryFallback)
|
export default HistoryContainer
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { memo } from 'react'
|
import { memo } from 'react'
|
||||||
import { HistoryProvider } from '@/features/history/context/history-context'
|
import { HistoryProvider } from '@/features/history/context/history-context'
|
||||||
|
import withErrorBoundary from '@/infrastructure/error-boundary'
|
||||||
|
import { ErrorBoundaryFallback } from '@/shared/components/error-boundary-fallback'
|
||||||
import History from './history'
|
import History from './history'
|
||||||
|
|
||||||
const HistoryRoot = () => (
|
const HistoryRoot = () => (
|
||||||
|
@ -8,4 +10,4 @@ const HistoryRoot = () => (
|
||||||
</HistoryProvider>
|
</HistoryProvider>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default memo(HistoryRoot)
|
export default withErrorBoundary(memo(HistoryRoot), ErrorBoundaryFallback)
|
||||||
|
|
Loading…
Add table
Reference in a new issue