This repository was archived by the owner on Nov 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 33import React , { useRef , useState } from "react"
44import { Loader2 } from "lucide-react"
55import { Configuration , OpenAIApi } from "openai"
6+ import { CodeBlock , sunburst } from "react-code-blocks"
67
7- import { siteConfig } from "@/config/site"
8- import { Button , buttonVariants } from "@/components/ui/button"
8+ import { Button } from "@/components/ui/button"
99import { Input } from "@/components/ui/input"
1010import {
1111 Select ,
1212 SelectContent ,
13- SelectGroup ,
1413 SelectItem ,
15- SelectLabel ,
1614 SelectTrigger ,
1715 SelectValue ,
1816} from "@/components/ui/select"
@@ -101,11 +99,15 @@ export default function IndexPage() {
10199 < TabsTrigger value = "preview" > Preview</ TabsTrigger >
102100 </ TabsList >
103101 < TabsContent value = "code" className = "h-full w-full" >
104- < Textarea
105- id = "codetxt"
106- placeholder = "Code will be shown here"
107- value = { md }
108- />
102+ < div style = { { fontFamily : "consolas" } } >
103+ < CodeBlock
104+ text = { md }
105+ language = "markdown"
106+ wrapLines
107+ showLineNumbers = { false }
108+ theme = { sunburst }
109+ />
110+ </ div >
109111 < div
110112 className = {
111113 sent
You can’t perform that action at this time.
0 commit comments