import { Button } from "@rallly/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@rallly/ui/dialog"; import { ArrowUpRightIcon, Share2Icon } from "lucide-react"; import Link from "next/link"; import React from "react"; import { useCopyToClipboard } from "react-use"; import { useParticipants } from "@/components/participants-provider"; import { Trans } from "@/components/trans"; import { usePoll } from "@/contexts/poll"; export const InviteDialog = () => { const { participants } = useParticipants(); const [isOpen, setIsOpen] = React.useState(participants.length === 0); const poll = usePoll(); const [state, copyToClipboard] = useCopyToClipboard(); React.useEffect(() => { if (state.error) { console.error(`Unable to copy value: ${state.error.message}`); } }, [state]); const [didCopy, setDidCopy] = React.useState(false); return (

); };