diff --git a/src/app/dashboard/snippets/components/snippet-card.tsx b/src/app/dashboard/snippets/components/snippet-card.tsx index 4e2d4ac..3080ea9 100644 --- a/src/app/dashboard/snippets/components/snippet-card.tsx +++ b/src/app/dashboard/snippets/components/snippet-card.tsx @@ -20,7 +20,7 @@ import { import { cn } from "@/lib/utils"; import { Snippet } from "@prisma/client"; import { Badge } from "@/components/ui/badge"; -import { ScrollArea } from "@/components/ui/scroll-area"; +import { SnippetShowForm } from "./snippet-show-form"; const languageIcons = { c: { icon: COriginal }, @@ -54,7 +54,7 @@ export function SnippetCard({ const renderLanguageBadge = () => (
{languageInfo?.icon && } @@ -71,19 +71,15 @@ export function SnippetCard({ ); return ( - - - + + + {snippet.title} {renderLanguageBadge()} - -
-            {snippet.code}
-          
-
+
{renderTimestamp()} diff --git a/src/app/dashboard/snippets/components/snippet-show-form.tsx b/src/app/dashboard/snippets/components/snippet-show-form.tsx new file mode 100644 index 0000000..749869c --- /dev/null +++ b/src/app/dashboard/snippets/components/snippet-show-form.tsx @@ -0,0 +1,38 @@ +"use client"; + +import { Snippet } from "@prisma/client"; +import { Editor } from "@monaco-editor/react"; + +interface SnippetShowFormProps { + snippet: Snippet; +} + +export function SnippetShowForm({ snippet }: SnippetShowFormProps) { + return ( +
+ +
+ ); +}