mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-22 21:36:25 +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 { PollSettingsForm } from "@/components/forms/poll-settings";
|
||||||
import { Trans } from "@/components/trans";
|
import { Trans } from "@/components/trans";
|
||||||
|
import { useUser } from "@/components/user-provider";
|
||||||
import { setCookie } from "@/utils/cookies";
|
import { setCookie } from "@/utils/cookies";
|
||||||
import { usePostHog } from "@/utils/posthog";
|
import { usePostHog } from "@/utils/posthog";
|
||||||
import { trpc } from "@/utils/trpc/client";
|
import { trpc } from "@/utils/trpc/client";
|
||||||
|
@ -39,7 +40,7 @@ export interface CreatePollPageProps {
|
||||||
|
|
||||||
export const CreatePoll: React.FunctionComponent = () => {
|
export const CreatePoll: React.FunctionComponent = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { user } = useUser();
|
||||||
const form = useForm<NewEventData>({
|
const form = useForm<NewEventData>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
title: "",
|
title: "",
|
||||||
|
@ -97,6 +98,7 @@ export const CreatePoll: React.FunctionComponent = () => {
|
||||||
pollId: res.id,
|
pollId: res.id,
|
||||||
numberOfOptions: formData.options?.length,
|
numberOfOptions: formData.options?.length,
|
||||||
optionsView: formData?.view,
|
optionsView: formData?.view,
|
||||||
|
tier: user.tier,
|
||||||
});
|
});
|
||||||
queryClient.invalidate();
|
queryClient.invalidate();
|
||||||
router.push(`/poll/${res.id}`);
|
router.push(`/poll/${res.id}`);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue