mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-22 05:16:23 +02:00
📈 Capture tier when create poll (#1191)
This commit is contained in:
parent
ef4449abb5
commit
8384128246
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ import { useUnmount } from "react-use";
|
|||
|
||||
import { PollSettingsForm } from "@/components/forms/poll-settings";
|
||||
import { Trans } from "@/components/trans";
|
||||
import { useUser } from "@/components/user-provider";
|
||||
import { setCookie } from "@/utils/cookies";
|
||||
import { usePostHog } from "@/utils/posthog";
|
||||
import { trpc } from "@/utils/trpc/client";
|
||||
|
@ -39,7 +40,7 @@ export interface CreatePollPageProps {
|
|||
|
||||
export const CreatePoll: React.FunctionComponent = () => {
|
||||
const router = useRouter();
|
||||
|
||||
const { user } = useUser();
|
||||
const form = useForm<NewEventData>({
|
||||
defaultValues: {
|
||||
title: "",
|
||||
|
@ -97,6 +98,7 @@ export const CreatePoll: React.FunctionComponent = () => {
|
|||
pollId: res.id,
|
||||
numberOfOptions: formData.options?.length,
|
||||
optionsView: formData?.view,
|
||||
tier: user.tier,
|
||||
});
|
||||
queryClient.invalidate();
|
||||
router.push(`/poll/${res.id}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue