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

View File

@@ -1,4 +1,5 @@
import { AffineErrorBoundary } from '@affine/core/components/affine/affine-error-boundary';
import { AffineErrorComponent } from '@affine/core/components/affine/affine-error-boundary/affine-error-fallback';
import { AppFallback } from '@affine/core/components/affine/app-container';
import { PageNotFound } from '@affine/core/desktop/pages/404';
import { MobileWorkbenchRoot } from '@affine/core/desktop/pages/workspace/workbench-root';
@@ -59,6 +60,7 @@ const warpedRoutes = workbenchRoutes.map((originalRoute: RouteObject) => {
Component: () => {
return <MobileRouteContainer route={route} />;
},
errorElement: <AffineErrorComponent />,
};
});