diff --git a/src/app/snippets/[id]/edit/page.tsx b/src/app/snippets/[id]/edit/page.tsx new file mode 100644 index 0000000..9f16eff --- /dev/null +++ b/src/app/snippets/[id]/edit/page.tsx @@ -0,0 +1,11 @@ +interface SnippetEditPageProps { + params: Promise<{ + id: string; + }>; +} + +export default async function SnippetEditPage(props: SnippetEditPageProps) { + const params = await props.params; + const id = parseInt(params.id); + return
Editing snippet with id {id}
; +} diff --git a/src/app/snippets/[id]/page.tsx b/src/app/snippets/[id]/page.tsx index 120b124..5b191f6 100644 --- a/src/app/snippets/[id]/page.tsx +++ b/src/app/snippets/[id]/page.tsx @@ -1,4 +1,5 @@ import { db } from "@/db"; +import Link from "next/link"; import { notFound } from "next/navigation"; interface SnippetShowPageProps { @@ -26,7 +27,12 @@ export default async function SnippetShowPage(props: SnippetShowPageProps) {

{snippet.title}

- + + Edit +