Skip to content

Commit 2276a89

Browse files
authored
Update create-your-first-crud.mdx
Updated fix: To PageAdminProject.tsx page code to `params?.id?.toString() ?? 'unknown'` so it is the same syntax than other pages in the project. To the lines that are shown as changed in the docs.
1 parent 5cff113 commit 2276a89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/tutorials/create-your-first-crud.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,7 @@ export default function Page() {
21762176

21772177
Now, in the `PageAdminProject.tsx` we can add an edit button which links to the update page.
21782178

2179-
```tsx {1-4, 14-22} filename="src/features/projects/PageAdminProject.tsx" showLineNumbers
2179+
```tsx {1-4, 14-24} filename="src/features/projects/PageAdminProject.tsx" showLineNumbers
21802180
import Link from "next/link";
21812181
import { LuPenLine } from "react-icons/lu";
21822182
import { ResponsiveIconButton } from "@/components/ResponsiveIconButton";
@@ -2194,7 +2194,7 @@ export default function PageAdminProject() {
21942194
<ResponsiveIconButton
21952195
as={Link}
21962196
href={ROUTES_PROJECTS.admin.update({
2197-
id: project.data?.id ?? "Unknown",
2197+
params?.id?.toString() ?? 'unknown',
21982198
})}
21992199
icon={<LuPenLine />}
22002200
>

0 commit comments

Comments
 (0)