Only show hidden nav bar items in "More" page

This commit is contained in:
schroda
2025-04-05 15:17:46 +02:00
parent dbf06a54b9
commit dcf1b5b1c2
7 changed files with 241 additions and 99 deletions

View File

@@ -170,4 +170,14 @@ export const AppRoutes = {
match: '/more',
path: '/more',
},
} satisfies TAppRoutes;
} as const satisfies TAppRoutes;
type ExtractChildRouteStringPaths<T> = T extends { childRoutes: infer U } ? ExtractStringPaths<U[keyof U]> : never;
type ExtractStringPaths<T> = T extends { path: infer P }
? P extends string
? P | ExtractChildRouteStringPaths<T>
: ExtractChildRouteStringPaths<T>
: ExtractChildRouteStringPaths<T>;
export type StaticAppRoute = ExtractStringPaths<(typeof AppRoutes)[keyof typeof AppRoutes]>;