diff --git a/src/components/ShareLinks.tsx b/src/components/ShareLinks.tsx new file mode 100644 index 0000000..7e89a07 --- /dev/null +++ b/src/components/ShareLinks.tsx @@ -0,0 +1,89 @@ +'use client' +// src/components/ShareLinks.tsx +import { useState } from 'react' + +interface ShareLinksProps { + title: string + url: string +} + +const btnClass = + 'inline-flex items-center justify-center w-[34px] h-[34px] rounded-sm border border-hair-2 text-ink-2 hover:text-ink hover:border-ink transition-colors' + +export function ShareLinks({ title, url }: ShareLinksProps) { + const [copied, setCopied] = useState(false) + + const blueskyUrl = `https://bsky.app/intent/compose?text=${encodeURIComponent(`${title} ${url}`)}` + const linkedinUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}` + + async function handleCopy() { + try { + await navigator.clipboard.writeText(url) + setCopied(true) + setTimeout(() => setCopied(false), 2000) + } catch { + // Clipboard write failed silently + } + } + + return ( +
+
+ Share +
+
+ {/* Bluesky */} + + + + + {/* LinkedIn */} + + + + + {/* Copy link */} + +
+
+ ) +}