refactor(core): adjust error detail and add error component to routes (#8234)

close PD-1430

https://github.com/user-attachments/assets/9447eaa5-c8b3-4108-96f1-d67ab45f249d

![CleanShot 2024-09-13 at 13 28 52@2x](https://github.com/user-attachments/assets/8c6c3a1d-9af7-41df-9d33-b69684d54d6b)
This commit is contained in:
JimmFly
2024-09-19 02:12:03 +00:00
parent ed7fb3fb71
commit ee3c05904d
22 changed files with 204 additions and 179 deletions
@@ -1,4 +1,5 @@
import { ResizePanel } from '@affine/component/resize-panel';
import { AffineErrorComponent } from '@affine/core/components/affine/affine-error-boundary/affine-error-fallback';
import { rightSidebarWidthAtom } from '@affine/core/components/atoms';
import { workbenchRoutes } from '@affine/core/desktop/workbench-router';
import {
@@ -29,6 +30,7 @@ const useAdapter = BUILD_CONFIG.isElectron
const routes: RouteObject[] = [
{
element: <RouteContainer />,
errorElement: <AffineErrorComponent />,
children: workbenchRoutes,
},
];