sforkowany z mirror/soapbox
Merge branch 'revert-poll-commit' into 'develop'
Revert commit for poll design See merge request soapbox-pub/soapbox-fe!1513chats-fixes
commit
10ff430cca
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue