diff --git a/raven-app/src/components/feature/chat/ChatMessage/Renderers/PollMessage.tsx b/raven-app/src/components/feature/chat/ChatMessage/Renderers/PollMessage.tsx index 89d416fc8..638b83b6b 100644 --- a/raven-app/src/components/feature/chat/ChatMessage/Renderers/PollMessage.tsx +++ b/raven-app/src/components/feature/chat/ChatMessage/Renderers/PollMessage.tsx @@ -1,4 +1,4 @@ -import { Box, Checkbox, Flex, Text, RadioGroup, Button } from "@radix-ui/themes" +import { Box, Checkbox, Flex, Text, RadioGroup, Button, Badge } from "@radix-ui/themes" import { BoxProps } from "@radix-ui/themes/dist/cjs/components/box" import { memo, useEffect, useMemo, useState } from "react" import { UserFields } from "../../../../../utils/users/UserListProvider" @@ -55,7 +55,10 @@ const PollMessageBox = ({ data, messageID }: { data: Poll, messageID: string }) w-full rounded-md"> - {data.poll.question} + + {data.poll.question} + {data.poll.is_anonymous ? Anonymous : null} + {data.current_user_votes.length > 0 ? : <> @@ -65,6 +68,7 @@ const PollMessageBox = ({ data, messageID }: { data: Poll, messageID: string }) } } + {data.poll.is_disabled ? Poll is now closed : null} ) @@ -151,7 +155,7 @@ const SingleChoicePoll = ({ data, messageID }: { data: Poll, messageID: string }
- onVoteSubmit(option)} /> + onVoteSubmit(option)} /> {option.option} @@ -196,7 +200,7 @@ const MultiChoicePoll = ({ data, messageID }: { data: Poll, messageID: string })
- handleCheckboxChange(option.name, v)} /> + handleCheckboxChange(option.name, v)} /> {option.option} @@ -204,7 +208,7 @@ const MultiChoicePoll = ({ data, messageID }: { data: Poll, messageID: string }) ))} To view the poll results, please submit your choice(s) - +
)