mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(core): add view error boundary (#6036)
This commit is contained in:
@@ -6,6 +6,7 @@ import { useService } from '@toeverything/infra/di';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { Suspense, useCallback } from 'react';
|
||||
|
||||
import { AffineErrorBoundary } from '../../../components/affine/affine-error-boundary';
|
||||
import {
|
||||
appSidebarOpenAtom,
|
||||
SidebarSwitch,
|
||||
@@ -68,9 +69,11 @@ export const RouteContainer = ({ route }: Props) => {
|
||||
)}
|
||||
</div>
|
||||
<view.body.Target className={styles.viewBodyContainer} />
|
||||
<Suspense>
|
||||
<route.Component />
|
||||
</Suspense>
|
||||
<AffineErrorBoundary>
|
||||
<Suspense>
|
||||
<route.Component />
|
||||
</Suspense>
|
||||
</AffineErrorBoundary>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user