fix(core): adjust error boundary level (#5493)

Allowing showing page title for page detail when page throws error.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/398bef13-c52d-40b4-bf53-5157582d030a.png)
This commit is contained in:
Peng Xiao
2024-01-02 13:20:13 +00:00
parent 922bc11f16
commit 444de6d4ac
2 changed files with 21 additions and 21 deletions
@@ -79,7 +79,7 @@ const ModalContainer = ({
withoutCloseButton
contentOptions={contentOptions}
>
<AffineErrorBoundary>{children}</AffineErrorBoundary>
{children}
</Modal>
);
};
@@ -138,12 +138,14 @@ const HistoryEditorPreview = ({
</div>
{snapshotPage ? (
<BlockSuiteEditor
className={styles.editor}
mode={mode}
page={snapshotPage}
onModeChange={onModeChange}
/>
<AffineErrorBoundary>
<BlockSuiteEditor
className={styles.editor}
mode={mode}
page={snapshotPage}
onModeChange={onModeChange}
/>
</AffineErrorBoundary>
) : (
<div className={styles.loadingContainer}>
<Loading size={24} />