"use client"; import { CheckIcon, LinkIcon } from "lucide-react"; import { useState } from "react"; import { cn } from "@/lib/utils"; /** * The one interactive subscribe option: copies the iCal URL for apps that * want it pasted (Outlook and friends). Takes the shared card classes from the * page so the three options stay identical. */ export function CopyLinkCard({ url, className }: { url: string; className: string }) { const [state, setState] = useState<"idle" | "copied" | "failed">("idle"); const copy = async () => { try { await navigator.clipboard.writeText(url); setState("copied"); } catch { // No clipboard access (older browser, insecure context): show the URL instead of failing silently. setState("failed"); } setTimeout(() => setState("idle"), 2500); }; return ( ); }