initial commit.

This commit is contained in:
2025-05-03 21:10:51 +07:00
parent 3f9d8a1fa0
commit 474bc266c7
133 changed files with 24259 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
"use client";
import { CheckIcon, CopyIcon } from "lucide-react";
import { Button } from "../ui/button";
import { useState } from "react";
export default function Copy({ content }: { content: string }) {
const [isCopied, setIsCopied] = useState(false);
async function handleCopy() {
await navigator.clipboard.writeText(content);
setIsCopied(true);
setTimeout(() => {
setIsCopied(false);
}, 2000);
}
return (
<Button
variant="secondary"
className="border"
size="xs"
onClick={handleCopy}
>
{isCopied ? (
<CheckIcon className="w-3 h-3" />
) : (
<CopyIcon className="w-3 h-3" />
)}
</Button>
);
}