(documentId: string)
| 55 | } |
| 56 | |
| 57 | const handleCopyLink = (documentId: string) => { |
| 58 | const link = `${process.env.NEXT_PUBLIC_SITE_URL}/links/view/${documentId}` |
| 59 | navigator.clipboard |
| 60 | .writeText(link) |
| 61 | .then(() => { |
| 62 | toast({ |
| 63 | description: "Your link has been copied", |
| 64 | }) |
| 65 | }) |
| 66 | .catch((error) => { |
| 67 | toast({ |
| 68 | description: "There was an error copying your link", |
| 69 | }) |
| 70 | }) |
| 71 | } |
| 72 | |
| 73 | const linkUrl = (document: Document) => { |
| 74 | return `${process.env.NEXT_PUBLIC_SITE_URL}/links/view/${document.id}` |