mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-24 06:16:25 +02:00
This commit is contained in:
parent
737d6e73ed
commit
5a785a5317
5 changed files with 47 additions and 47 deletions
|
@ -18,7 +18,6 @@ import { PollSettingsForm } from "@/components/forms/poll-settings";
|
|||
import { Trans } from "@/components/trans";
|
||||
import { useUser } from "@/components/user-provider";
|
||||
import { setCookie } from "@/utils/cookies";
|
||||
import { getBrowserTimeZone } from "@/utils/date-time-utils";
|
||||
import { usePostHog } from "@/utils/posthog";
|
||||
import { trpc } from "@/utils/trpc/client";
|
||||
|
||||
|
@ -48,8 +47,6 @@ export const CreatePoll: React.FunctionComponent = () => {
|
|||
description: "",
|
||||
location: "",
|
||||
view: "month",
|
||||
autoTimeZone: true,
|
||||
timeZone: user.timeZone || getBrowserTimeZone(),
|
||||
options: [],
|
||||
hideScores: false,
|
||||
hideParticipants: false,
|
||||
|
@ -79,13 +76,13 @@ export const CreatePoll: React.FunctionComponent = () => {
|
|||
<form
|
||||
onSubmit={form.handleSubmit(async (formData) => {
|
||||
const title = required(formData?.title);
|
||||
const isFullDay = formData?.options?.[0]?.type === "date";
|
||||
|
||||
await createPoll.mutateAsync(
|
||||
{
|
||||
title: title,
|
||||
location: formData?.location,
|
||||
description: formData?.description,
|
||||
timeZone: !isFullDay ? formData?.timeZone : undefined,
|
||||
timeZone: formData?.timeZone,
|
||||
hideParticipants: formData?.hideParticipants,
|
||||
disableComments: formData?.disableComments,
|
||||
hideScores: formData?.hideScores,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue