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
@@ -8,6 +8,7 @@ import {
useNavigate,
} from 'react-router-dom';
import { AffineErrorComponent } from '../components/affine/affine-error-boundary/affine-error-fallback';
import { NavigateContext } from '../components/hooks/use-navigate-helper';
import { RootWrapper } from './pages/root';
@@ -31,6 +32,7 @@ export function RootRouter() {
export const topLevelRoutes = [
{
element: <RootRouter />,
errorElement: <AffineErrorComponent />,
children: [
{
path: '/',