🚑 Fix deleting a date option removes votes for other options

This commit is contained in:
Luke Vella 2023-03-31 12:14:02 +01:00
parent 6ef2b1ce5d
commit c8fd9d3d50

View file

@ -25,7 +25,7 @@ import { useUpdatePollMutation } from "./mutations";
const PollOptionsForm = React.lazy(() => import("../forms/poll-options-form"));
const convertOptionToString = (option: { start: Date; duration: number }) => {
const start = dayjs(option.start);
const start = dayjs(option.start).utc();
return option.duration === 0
? start.format("YYYY-MM-DD")
: `${start.format("YYYY-MM-DDTHH:mm:ss")}/${start