feat: add translation support for polls

This commit is contained in:
codytseng
2025-07-28 21:07:34 +08:00
parent cd2c48dd5c
commit c697e8629d
3 changed files with 83 additions and 19 deletions

View File

@@ -24,9 +24,13 @@ export default function TranslateButton({
const translatedEvent = useTranslatedEvent(event.id)
const supported = useMemo(
() =>
[kinds.ShortTextNote, kinds.Highlights, ExtendedKind.COMMENT, ExtendedKind.PICTURE].includes(
event.kind
),
[
kinds.ShortTextNote,
kinds.Highlights,
ExtendedKind.COMMENT,
ExtendedKind.PICTURE,
ExtendedKind.POLL
].includes(event.kind),
[event]
)