add download video event
This commit is contained in:
parent
51eaa538f1
commit
9be8efeadf
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import {
|
|||
TrashIcon,
|
||||
} from "@radix-ui/react-icons";
|
||||
import { useRouter } from "next/router";
|
||||
import { usePostHog } from "posthog-js/react";
|
||||
|
||||
interface Props {
|
||||
video: RouterOutputs["video"]["get"];
|
||||
|
|
@ -18,6 +19,7 @@ export default function VideoMoreMenu({ video }: Props) {
|
|||
const [renameMenuOpen, setRenameMenuOpen] = useState<boolean>(false);
|
||||
const utils = api.useContext();
|
||||
const router = useRouter();
|
||||
const posthog = usePostHog();
|
||||
|
||||
const items = [
|
||||
{
|
||||
|
|
@ -42,7 +44,10 @@ export default function VideoMoreMenu({ video }: Props) {
|
|||
a.download = video.title;
|
||||
a.click();
|
||||
});
|
||||
//window.location.href = response.url;
|
||||
});
|
||||
|
||||
posthog?.capture("download existing video", {
|
||||
videoId: video.id,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue