diff --git a/www/app/transcripts/[transcriptId]/page.tsx b/www/app/transcripts/[transcriptId]/page.tsx index 17cee689..8d5ea934 100644 --- a/www/app/transcripts/[transcriptId]/page.tsx +++ b/www/app/transcripts/[transcriptId]/page.tsx @@ -10,6 +10,7 @@ import { Topic } from "../webSocketTypes"; import React, { useEffect, useState } from "react"; import "../../styles/button.css"; import FinalSummary from "../finalSummary"; +import ShareLink from "../shareLink"; type TranscriptDetails = { params: { @@ -55,6 +56,8 @@ export default function TranscriptDetails(details: TranscriptDetails) { autoscroll={false} />
+ +
{transcript?.response?.longSummary && ( diff --git a/www/app/transcripts/shareLink.tsx b/www/app/transcripts/shareLink.tsx new file mode 100644 index 00000000..e0e536b9 --- /dev/null +++ b/www/app/transcripts/shareLink.tsx @@ -0,0 +1,52 @@ +import React, { useState, useRef } from "react"; + +const ShareLink = () => { + const [isCopied, setIsCopied] = useState(false); + const inputRef = useRef(null); + + const currentURL = window.location.href; + + const handleCopyClick = () => { + if (inputRef.current) { + inputRef.current.select(); + document.execCommand("copy"); + setIsCopied(true); + + // Reset the copied state after 2 seconds + setTimeout(() => setIsCopied(false), 2000); + } + }; + + return ( +
+

+ You can share this link with others. Anyone with the link will have + access to the page, including the full audio recording, for the next 10 + days. +

+
+ + +
+
+ ); +}; + +export default ShareLink;