|
|
@ -1,5 +1,6 @@ |
|
|
|
import { useState } from "react"; |
|
|
|
import { useState } from "react"; |
|
|
|
import copyIcon from "./copy.png"; |
|
|
|
import copyIcon from "./copy.png"; |
|
|
|
|
|
|
|
import MonacoEditor from "react-monaco-editor"; |
|
|
|
|
|
|
|
|
|
|
|
function Code({ code }) { |
|
|
|
function Code({ code }) { |
|
|
|
const [copied, setCopied] = useState(false); |
|
|
|
const [copied, setCopied] = useState(false); |
|
|
@ -13,6 +14,7 @@ function Code({ code }) { |
|
|
|
/* Copy the text inside the text field */ |
|
|
|
/* Copy the text inside the text field */ |
|
|
|
navigator.clipboard.writeText(copyText); |
|
|
|
navigator.clipboard.writeText(copyText); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="flex flex-col w-full my-10"> |
|
|
|
<div className="flex flex-col w-full my-10"> |
|
|
|
<div className="w-full flex flex-row items-center justify-between"> |
|
|
|
<div className="w-full flex flex-row items-center justify-between"> |
|
|
|