The following code snippet explains how I define the application routes.
let routes = useRoutes([
{ path: '/', element: <Home /> },
{
path: 'users',
element: <Users />,
children: [
{ path: '/', element: <UsersIndex /> },
{ path: ':id', element: <UserProfile /> },
{ path: 'me', element: <OwnUserProfile /> },
]
}
]);
I would like to have a basename defined for all available routes. So, every route needs to have /ui/ basename prepended. '/' should also be redirected to '/ui/'.
Previously, during the beta phase it was possible to define basename as following:
const routes = useRoutes(appRoutes, { basename: 'ui' });
However, it is no longer working.