docs(frontend-system): fix route subpaths example

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-01-09 09:51:39 +01:00
parent 1bb3addf16
commit 76cbd8a54b
@@ -400,13 +400,13 @@ const rootPage = createPageExtension({
defaultPath: '/'
routeRef: rootRouteRef,
loader: async () => {
const { path } = useRouteRef(detailsRouteRef)();
const detailsRouteRef = useRouteRef(detailsRouteRef)();
return (
<div>
<h1>Index Page</h1>
<Routes>
<Route path={path} element={<DetailsPage />} />
<Route path={detailsRouteRef.path} element={<DetailsPage />} />
</Routes>
</div>
);