Skip to content

Commit 3155fcd

Browse files
authored
Update create-your-first-crud.mdx
Updated fix with `isDisabled={!params?.id}` + added the line to showLineModified tsx setting.
1 parent 2276a89 commit 3155fcd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
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-24} filename="src/features/projects/PageAdminProject.tsx" showLineNumbers
2179+
```tsx {1-4, 14-25} 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";
@@ -2196,6 +2196,7 @@ export default function PageAdminProject() {
21962196
href={ROUTES_PROJECTS.admin.update({
21972197
params?.id?.toString() ?? 'unknown',
21982198
})}
2199+
isDisabled={!params?.id}
21992200
icon={<LuPenLine />}
22002201
>
22012202
Edit

0 commit comments

Comments
 (0)