diff --git a/src/components/CodeAndPreview.tsx b/src/components/CodeAndPreview.tsx
index 44f01b5..1bfd6e7 100644
--- a/src/components/CodeAndPreview.tsx
+++ b/src/components/CodeAndPreview.tsx
@@ -188,7 +188,13 @@ export function CodeAndPreview({ snippet }: Props) {
/>
)}
-
+ {
+ setCode(
+ `import {} from "@tsci/${snippet.owner_name}.${snippet.unscoped_name}"\n${snippet.code}`,
+ )
+ }}
+ />
)
}
diff --git a/src/components/dialogs/import-snippet-dialog.tsx b/src/components/dialogs/import-snippet-dialog.tsx
index 806fed8..797ed44 100644
--- a/src/components/dialogs/import-snippet-dialog.tsx
+++ b/src/components/dialogs/import-snippet-dialog.tsx
@@ -46,7 +46,12 @@ export const ImportSnippetDialog = ({
{snippets?.map((snippet: Snippet) => (
-
-