-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
apps/bible/app/bible/routing/nested-dynamic-routes/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<Stack> | ||
<Layout title="Autocomplete / typesefe"> | ||
<Link href="/bible/routing/nested-dynamic-routes/todo/1">Todo #1</Link> | ||
</Layout> | ||
<Layout title="Continue route - works, bug"> | ||
{/*@ts-ignore*/} | ||
<Link href="nested-dynamic-routes/todo/1">Todo #1</Link> | ||
</Layout> | ||
<Layout title="function / typesafe"> | ||
<Link | ||
href={routes.bible.routing.nestedDynamicRoutes.todo[":id"]("2").index} | ||
> | ||
Todo #1 | ||
</Link> | ||
</Layout> | ||
</Stack> | ||
); | ||
}; | ||
|
||
const Layout: FC<{ title: string } & PropsWithChildren> = ({ | ||
title, | ||
children, | ||
}) => ( | ||
<Stack gap="xs"> | ||
<Text>{title}</Text> | ||
{children} | ||
</Stack> | ||
); | ||
|
||
export default NestedDynamicRoutesPage; |
5 changes: 5 additions & 0 deletions
5
apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const TodoPageById = () => { | ||
return <div>todo page by id</div>; | ||
}; | ||
|
||
export default TodoPageById; |
5 changes: 5 additions & 0 deletions
5
apps/bible/app/bible/routing/nested-dynamic-routes/todo/[todo-id]/user/[user-id]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const UserPageById = () => { | ||
return <div>user page by id</div>; | ||
}; | ||
|
||
export default UserPageById; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters