import classNames from "classnames"; import { CopyIcon } from "lucide-react"; import { useMemo, useState } from "react"; import { useCopyToClipboard, useUpdateEffect } from "react-use"; export const CopyToClipboard = ({ id }: { id: string }) => { const [state, copyToClipboard] = useCopyToClipboard(); const [copied, setCopied] = useState(false); const url = useMemo(() => { return `https://huggingface.co/spaces/enzostvs/hugger-roaster/${id}`; }, [id]); const handleCopy = () => { setCopied(true); copyToClipboard(url); setTimeout(() => { setCopied(false); }, 2000); }; return (

Share this link with your friends so they can see your roast and try it out themselves!

Copied!

{url}

); };