allow for creating and viewing single-option polls

merge-requests/3364/head
Sneed 2025-04-09 16:20:33 +01:00
rodzic c568f2dc3c
commit 047947b155
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -61,7 +61,7 @@ const Option: React.FC<IOption> = ({
const handleOptionTitleChange = (event: React.ChangeEvent<HTMLInputElement>) => onChange(index, event.target.value);
const handleOptionRemove = () => {
if (numOptions > 2) {
if (numOptions > 1) {
onRemove(index);
} else {
onRemovePoll();
@ -100,7 +100,7 @@ const Option: React.FC<IOption> = ({
/>
</HStack>
{index > 1 && (
{index > 0 && (
<div>
<Button theme='danger' size='sm' onClick={handleOptionRemove}>
<FormattedMessage id='compose_form.poll.remove_option' defaultMessage='Remove this answer' />