Skip to content

Commit

Permalink
fixed demo app router
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Dec 12, 2023
1 parent 0ddd782 commit 686a339
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion demo/src/router/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function AppRoutes(props: AppRoutesProps) {

const setRoutes = useStoreActions((actions) => actions.routes.setRoutes);
const entityMap = getEntityMap();

const baseUrl = process.env.BASE_URL || '/';

const routes = useMemo<RouteObject[]>(() => {
Expand All @@ -37,7 +38,7 @@ export default function AppRoutes(props: AppRoutesProps) {

routeSpecs.map((route: RouteSpec) => {
routes.push({
path: baseUrl + route.path.substring(1),
path: baseUrl + "/" + route.path.substring(1),
element: (
<AppRouteContentWrapper loggedIn={true} routeMap={entityMap}>
<RouteContent route={route} routeMap={entityMap} {...props} />
Expand Down

0 comments on commit 686a339

Please sign in to comment.