diff --git a/apps/bible/app/bible/project-structure/module/exmaple.md b/apps/bible/app/bible/project-structure/module/exmaple.md
index 75d52d5..a7a6231 100644
--- a/apps/bible/app/bible/project-structure/module/exmaple.md
+++ b/apps/bible/app/bible/project-structure/module/exmaple.md
@@ -15,6 +15,9 @@
- everything should be exported from index.tsx
+# bad
+ no cmp
+
# module/todo/index.tsx
```
diff --git a/apps/bible/app/bible/routing/nested-dynamic-routes/page.tsx b/apps/bible/app/bible/routing/nested-dynamic-routes/page.tsx
new file mode 100644
index 0000000..8b64dba
--- /dev/null
+++ b/apps/bible/app/bible/routing/nested-dynamic-routes/page.tsx
@@ -0,0 +1,38 @@
+import { Stack } from "@/components/primitives/stack";
+import { Text } from "@/components/typography/text";
+import { routes } from "@/site/routes";
+import Link from "next/link";
+import { FC, PropsWithChildren } from "react";
+
+const NestedDynamicRoutesPage = () => {
+ return (
+
+
+ Todo #1
+
+
+ {/*@ts-ignore*/}
+ Todo #1
+
+
+
+ Todo #1
+
+
+
+ );
+};
+
+const Layout: FC<{ title: string } & PropsWithChildren> = ({
+ title,
+ children,
+}) => (
+
+ {title}
+ {children}
+
+);
+
+export default NestedDynamicRoutesPage;
diff --git a/apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/page.tsx b/apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/page.tsx
new file mode 100644
index 0000000..663afd0
--- /dev/null
+++ b/apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/page.tsx
@@ -0,0 +1,5 @@
+const TodoPageById = () => {
+ return
todo page by id
;
+};
+
+export default TodoPageById;
diff --git a/apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/user/[user-id]/page.tsx b/apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/user/[user-id]/page.tsx
new file mode 100644
index 0000000..7af8f2e
--- /dev/null
+++ b/apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/user/[user-id]/page.tsx
@@ -0,0 +1,5 @@
+const UserPageById = () => {
+ return user page by id
;
+};
+
+export default UserPageById;
diff --git a/apps/bible/app/layout.tsx b/apps/bible/app/layout.tsx
index bbb4a8f..4005bd7 100644
--- a/apps/bible/app/layout.tsx
+++ b/apps/bible/app/layout.tsx
@@ -18,7 +18,6 @@ export default function RootLayout(
children: React.ReactNode;
}>,
) {
- console.log(props);
return (
diff --git a/apps/bible/site/bible-contents.ts b/apps/bible/site/bible-contents.ts
index 528a73e..f6e68f0 100644
--- a/apps/bible/site/bible-contents.ts
+++ b/apps/bible/site/bible-contents.ts
@@ -27,6 +27,10 @@ export const bibleContents: BibleContent[] = [
title: "Intercepting Routes",
href: routes.bible.routing.interceptingRoutes.index,
},
+ {
+ title: "Nested dynamic routes",
+ href: routes.bible.routing.nestedDynamicRoutes.index,
+ },
],
},
{
diff --git a/apps/bible/site/routes.ts b/apps/bible/site/routes.ts
index c2dd854..793894a 100644
--- a/apps/bible/site/routes.ts
+++ b/apps/bible/site/routes.ts
@@ -1,3 +1,5 @@
+import { Route } from "next";
+
export const routes = {
todos: {
index: "/todos",
@@ -8,15 +10,39 @@ export const routes = {
index: "/bible/data-fetching/parrallel-and-sequential",
},
},
+ projectStructure: {
+ module: {
+ index: "/bible/project-structure/module",
+ },
+ },
routing: {
interceptingRoutes: {
index: "/bible/routing/intercepting-routes",
},
- },
- projectStructure: {
- module: {
- index: "/bible/project-structure/module",
+ nestedDynamicRoutes: {
+ index: "/bible/routing/nested-dynamic-routes",
+ todo2: {
+ ":id": {
+ index: "/bible/routing/nested-dynamic-routes/todo/:id",
+ },
+ },
+ todo: {
+ ":id": (id: string): Record => ({
+ // @ts-ignore
+ index: `/bible/routing/nested-dynamic-routes/todo/${id}`,
+ }),
+ },
},
},
},
} as const;
+
+type GoToArgs = {
+ where: "";
+};
+
+type GoTo = (args: GoToArgs) => Route;
+
+export const goTo: GoTo = (args) => {
+ return "/bible/data-fetching/parrallel-and-sequential";
+};