[Glitch] Use JSX syntax for Fragments

Port 5a16bd7bf4 to glitch-soc
This commit is contained in:
Claire
2023-05-28 14:56:24 +02:00
parent 8278907ff7
commit a0bc0619ca
31 changed files with 110 additions and 127 deletions

View File

@ -1,6 +1,6 @@
// Package imports.
import PropTypes from 'prop-types';
import { PureComponent, Fragment } from 'react';
import { PureComponent } from 'react';
import classNames from 'classnames';
import { supportsPassiveEvents } from 'detect-passive-events';
@ -152,14 +152,14 @@ export default class ComposerOptionsDropdownContent extends PureComponent {
if (!contents) {
contents = (
<Fragment>
<>
{icon && <Icon className='icon' fixedWidth id={icon} />}
<div className='privacy-dropdown__option__content'>
<strong>{text}</strong>
{meta}
</div>
</Fragment>
</>
);
}

View File

@ -1,6 +1,5 @@
// Package imports.
import PropTypes from 'prop-types';
import { Fragment } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl } from 'react-intl';
import Toggle from 'react-toggle';
@ -101,14 +100,14 @@ class ToggleOptionImpl extends ImmutablePureComponent {
const { meta, text, checked } = this.props;
return (
<Fragment>
<>
<Toggle checked={checked} onChange={this.handleChange} />
<div className='privacy-dropdown__option__content'>
<strong>{text}</strong>
{meta}
</div>
</Fragment>
</>
);
}