'use client' import { CheckCircle2Icon, ExternalLinkIcon } from 'lucide-react' import Link from 'next/link' import { useEffect, useState } from 'react' import { SpeechCutShareActions } from '@/components/SpeechCutShareActions' import type { SpeechCutViewModel } from '@/lib/speechCut' import { youtubeThumbnailUrl } from '@/lib/speechVod' /** * C167 — the acervo result of a published cut: the public link with the share * kit (copy/WhatsApp/download), an Open Graph preview and the pointer to the * cut library (C168). Lives in session: after a reload the cut is reached * through its public link or, later, the library. */ export const SpeechCutResultCard = ({ cut }: { cut: SpeechCutViewModel }) => { const [absoluteUrl, setAbsoluteUrl] = useState('') useEffect(() => { setAbsoluteUrl(new URL(cut.publicPath, window.location.origin).toString()) }, [cut.publicPath]) const host = absoluteUrl ? new URL(absoluteUrl).host : null return (

Link público (funciona no WhatsApp)

{absoluteUrl || cut.publicPath}
Abrir página do corte
) }