Skip to content

Commit c430a7e

Browse files
committed
fix basic example
1 parent f4586a8 commit c430a7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/examples/basic/components/AdminLayout/AdminLayout.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export function AdminLayout() {
4444
[router],
4545
);
4646

47+
console.log("config", config);
48+
4749
const { tabs, activeTab } = useRouterTabs({
4850
router,
4951
paths,

src/examples/basic/utils/convertRouteTreeToRouterTabsConfig.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export const convertRouteTreeToRouterTabsConfig = (
2323
return {
2424
mapToUiState: (match, path) => ({
2525
id: path,
26+
title: tabMeta!.title(match),
2627
isClosable: true,
2728
content: <Outlet />,
28-
title: tabMeta!.title(match),
2929
}),
30-
shouldOpen: whenRoutePathIs(route.id!),
30+
shouldOpen: whenRoutePathIs(route.path!),
3131
insertAt: tabMeta!.insertAt || theBeginning,
3232
};
3333
});

0 commit comments

Comments
 (0)