diff --git a/src/timelines/toots/TootPoll.tsx b/src/timelines/toots/TootPoll.tsx index 42cbdd5..5c4fc3a 100644 --- a/src/timelines/toots/TootPoll.tsx +++ b/src/timelines/toots/TootPoll.tsx @@ -9,7 +9,7 @@ import { } from "solid-js"; import "./TootPoll.css"; import type { mastodon } from "masto"; -import { resolveCustomEmoji } from "../../masto/toot"; +import { resolveCustomEmoji } from "../../masto/toot.js"; import { Button, Checkbox, @@ -20,11 +20,11 @@ import { Radio, } from "@suid/material"; import { formatDistance, isBefore } from "date-fns"; -import { useTimeSource } from "~platform/timesrc"; -import { useDateFnLocale } from "~platform/i18n"; -import TootPollDialog from "./TootPollDialog"; -import { ANIM_CURVE_STD } from "~material/theme"; -import { useTootEnv } from "../RegularToot"; +import { useTimeSource } from "~platform/timesrc.js"; +import { useDateFnLocale } from "~platform/i18n.js"; +import TootPollDialog from "./TootPollDialog.js"; +import { ANIM_CURVE_STD } from "~material/theme.js"; +import { useTootEnv } from "../RegularToot.js"; type TootPollProps = { value: mastodon.v1.Poll; @@ -50,7 +50,12 @@ const TootPoll: Component = (props) => { return n; } - return poll().expired || poll().voted; + // TODO: More info for when is a poll available for vote + // I don't know the exact condition that the server + // prevent the user voting - say, mona allows you + // change your vote even after voted. I guess we + // need more test on that. + return poll().expired; }; const isOwnVote = createSelector(