Files
admin/apps/backend/app/templates/frontend/module/config/routing.tsx
T

31 lines
688 B
TypeScript
Executable File

/**
* Handles all module related routes.
* This component is mounted at /[moduleName]/* in the main application router.
*/
import { Navigate } from 'react-router-dom';
import ListPage from '../pages/ListPage';
import Layout from '../view/layouts/Layout';
import { MODULE_ROOT_PATH } from './meta';
export default {
path: MODULE_ROOT_PATH,
children: [
{ index: true, element: <Navigate to="list" replace /> },
{
path: `${MODULE_ROOT_PATH}/*`,
element: <Navigate to="/error/404" replace />
},
{
path: '',
element: <Layout />,
children: [
{
path: 'list',
element: <ListPage />
}
]
}
]
};