Merge branch 'revert-poll-commit' into 'develop'

Revert commit for poll design

See merge request soapbox-pub/soapbox-fe!1513
chats-fixes
Justin 2022-06-09 16:02:00 +00:00
commit 10ff430cca
2 zmienionych plików z 3 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' />); output.push(<ReadMoreButton onClick={onClick} key='read-more' />);
} }
const hasPoll = status.poll && typeof status.poll === 'string'; if (status.poll && typeof status.poll === 'string') {
if (hasPoll) {
output.push(<Poll id={status.poll} key='poll' status={status.url} />); 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 { } else {
const output = [ const output = [
<div <div

Wyświetl plik

@ -140,12 +140,7 @@ const PollForm = (props: IPollForm) => {
const maxOptions = pollLimits.get('max_options'); const maxOptions = pollLimits.get('max_options');
const maxOptionChars = pollLimits.get('max_characters_per_option'); const maxOptionChars = pollLimits.get('max_characters_per_option');
const handleAddOption = () => { const handleAddOption = () => onAddOption('');
// autofocus on new input
// use streamfield
onAddOption('');
};
const handleSelectDuration = (value: number) => onChangeSettings(value, isMultiple); const handleSelectDuration = (value: number) => onChangeSettings(value, isMultiple);
const handleToggleMultiple = () => onChangeSettings(expiresIn, !isMultiple); const handleToggleMultiple = () => onChangeSettings(expiresIn, !isMultiple);