fix: use navigate instead of resolver (#5823)
* fix: routes redirect * Apply suggestions from code review
This commit is contained in:
committed by
GitHub
parent
4071c44437
commit
2e4e4050cd
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { RouteObject, redirect } from 'react-router-dom';
|
||||
import { Navigate, RouteObject } from 'react-router-dom';
|
||||
|
||||
import { REDIRECTS } from 'apps/dashboard/routes/_redirects';
|
||||
import ConnectionRequired from 'components/ConnectionRequired';
|
||||
@@ -36,7 +36,7 @@ export const EXPERIMENTAL_APP_ROUTES: RouteObject[] = [
|
||||
},
|
||||
|
||||
/* Public routes */
|
||||
{ index: true, loader: () => redirect('/home.html') },
|
||||
{ index: true, element: <Navigate replace to='/home.html' /> },
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute)
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RouteObject, redirect } from 'react-router-dom';
|
||||
import { Navigate, RouteObject } from 'react-router-dom';
|
||||
import React from 'react';
|
||||
|
||||
import ConnectionRequired from 'components/ConnectionRequired';
|
||||
@@ -28,7 +28,7 @@ export const STABLE_APP_ROUTES: RouteObject[] = [
|
||||
},
|
||||
|
||||
/* Public routes */
|
||||
{ index: true, loader: () => redirect('/home.html') },
|
||||
{ index: true, element: <Navigate replace to='/home.html' /> },
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute)
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user