diff --git a/src/app/snippets/[id]/page.tsx b/src/app/snippets/[id]/page.tsx index 4719919..643f0be 100644 --- a/src/app/snippets/[id]/page.tsx +++ b/src/app/snippets/[id]/page.tsx @@ -2,6 +2,7 @@ import { db } from "@/db"; import Link from "next/link"; import * as actions from "@/actions"; import { notFound } from "next/navigation"; +import SnippetShowForm from "@/components/snippet-show-form"; interface SnippetShowPageProps { params: Promise<{ @@ -29,7 +30,10 @@ export default async function SnippetShowPage(props: SnippetShowPageProps) {

{snippet.title}

-
+
+ + Home +
-
-        {snippet.code}
-      
+
+ +
); } diff --git a/src/components/snippet-show-form.tsx b/src/components/snippet-show-form.tsx new file mode 100644 index 0000000..b31a665 --- /dev/null +++ b/src/components/snippet-show-form.tsx @@ -0,0 +1,22 @@ +"use client"; + +import { Snippet } from "@prisma/client"; +import { Editor } from "@monaco-editor/react"; + +interface SnippetShowFormProps { + snippet: Snippet; +} + +export default function SnippetShowForm({ snippet }: SnippetShowFormProps) { + return ( +
+ +
+ ); +}