📦️ Update posthog-js (#1204)

This commit is contained in:
Luke Vella 2024-07-13 16:04:28 +01:00 committed by GitHub
parent 55ef43c2e9
commit 849c199cdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 9 deletions

View file

@ -12,7 +12,7 @@ import { useRouter } from "next/navigation";
import React from "react";
import { useForm } from "react-hook-form";
import useFormPersist from "react-hook-form-persist";
import { useUnmount } from "react-use";
import { useMount, useUnmount } from "react-use";
import { PollSettingsForm } from "@/components/forms/poll-settings";
import { Trans } from "@/components/trans";
@ -62,6 +62,10 @@ export const CreatePoll: React.FunctionComponent = () => {
useUnmount(clear);
useMount(() => {
posthog?.startSessionRecording();
});
const posthog = usePostHog();
const queryClient = trpc.useUtils();
const createPoll = trpc.polls.create.useMutation({