Revert commit for poll design

This reverts commit 2a29a050a6.
chats-fixes
Justin 2022-06-09 11:49:17 -04:00
rodzic 6328b03783
commit c2551b9e35
2 zmienionych plików z 4 dodań i 10 usunięć

Wyświetl plik

@ -273,13 +273,11 @@ const StatusContent: React.FC<IStatusContent> = ({ status, expanded = false, onE
output.push(<ReadMoreButton onClick={onClick} key='read-more' />);
}
const hasPoll = status.poll && typeof status.poll === 'string';
if (hasPoll) {
if (status.poll && typeof status.poll === 'string') {
output.push(<Poll id={status.poll} key='poll' status={status.url} />);
}
return <div className={classNames({ 'bg-gray-100 rounded-md p-4': hasPoll })}>{output}</div>;
return <>{output}</>;
} else {
const output = [
<div

Wyświetl plik

@ -140,12 +140,7 @@ const PollForm = (props: IPollForm) => {
const maxOptions = pollLimits.get('max_options');
const maxOptionChars = pollLimits.get('max_characters_per_option');
const handleAddOption = () => {
// autofocus on new input
// use streamfield
onAddOption('');
};
const handleAddOption = () => onAddOption('');
const handleSelectDuration = (value: number) => onChangeSettings(value, isMultiple);
const handleToggleMultiple = () => onChangeSettings(expiresIn, !isMultiple);
@ -175,6 +170,7 @@ const PollForm = (props: IPollForm) => {
{options.size < maxOptions && (
<Button
theme='secondary'
icon={require('@tabler/icons/icons/plus.svg')}
onClick={handleAddOption}
size='sm'
>