ICU Fixathon - clean up React.Fragment old syntax (#29006)
* ICU Fixathon - clean up React.Fragment old syntax * enforce use of fragment shorthand over React.Fragment * use short version of fragment
Этот коммит содержится в:
@@ -32,7 +32,8 @@
|
|||||||
"react/style-prop-object": [2, {
|
"react/style-prop-object": [2, {
|
||||||
"allow": ["Timestamp"]
|
"allow": ["Timestamp"]
|
||||||
}],
|
}],
|
||||||
"formatjs/no-multiple-whitespaces": 2
|
"formatjs/no-multiple-whitespaces": 2,
|
||||||
|
"react/jsx-fragments": ["error", "syntax"]
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -927,8 +927,8 @@ class PluginManagement extends OLDAdminSettings<Props, State> {
|
|||||||
renderSettings = () => {
|
renderSettings = () => {
|
||||||
const {enableUploads} = this.state;
|
const {enableUploads} = this.state;
|
||||||
const enable = this.props.config?.PluginSettings?.Enable;
|
const enable = this.props.config?.PluginSettings?.Enable;
|
||||||
let serverError = <React.Fragment/>;
|
let serverError = <></>;
|
||||||
let lastMessage = <React.Fragment/>;
|
let lastMessage = <></>;
|
||||||
|
|
||||||
// Using props values to make sure these are set on the server and not just locally
|
// Using props values to make sure these are set on the server and not just locally
|
||||||
const enableUploadButton = enableUploads && enable && !(this.props.config.PluginSettings && this.props.config.PluginSettings.RequirePluginSignature);
|
const enableUploadButton = enableUploads && enable && !(this.props.config.PluginSettings && this.props.config.PluginSettings.RequirePluginSignature);
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ export default class TeamList extends React.PureComponent<Props, State> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div>{serverError}</div>
|
<div>{serverError}</div>
|
||||||
<AbstractList
|
<AbstractList
|
||||||
headerLabels={headerLabels}
|
headerLabels={headerLabels}
|
||||||
@@ -187,7 +187,7 @@ export default class TeamList extends React.PureComponent<Props, State> {
|
|||||||
emptyList={this.props.emptyList}
|
emptyList={this.props.emptyList}
|
||||||
userId={this.props.userId}
|
userId={this.props.userId}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -451,10 +451,10 @@ export class AppsForm extends React.PureComponent<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{iconComponent}
|
{iconComponent}
|
||||||
{title}
|
{title}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
|
|||||||
const {fields, header} = this.props.form;
|
const {fields, header} = this.props.form;
|
||||||
|
|
||||||
return (fields || header) && (
|
return (fields || header) && (
|
||||||
<React.Fragment>
|
<>
|
||||||
{header && (
|
{header && (
|
||||||
<AppsFormHeader
|
<AppsFormHeader
|
||||||
id='appsModalHeader'
|
id='appsModalHeader'
|
||||||
@@ -495,7 +495,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{this.renderElements()}
|
{this.renderElements()}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div>
|
<div>
|
||||||
{this.state.formError && (
|
{this.state.formError && (
|
||||||
<div>
|
<div>
|
||||||
@@ -571,7 +571,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
|
|||||||
</button>
|
</button>
|
||||||
{submitButtons}
|
{submitButtons}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,26 +73,26 @@ export default class AppsFormField extends React.PureComponent<Props> {
|
|||||||
const displayName = (field.modal_label || field.label) as string;
|
const displayName = (field.modal_label || field.label) as string;
|
||||||
let displayNameContent: React.ReactNode = (field.modal_label || field.label) as string;
|
let displayNameContent: React.ReactNode = (field.modal_label || field.label) as string;
|
||||||
displayNameContent = (
|
displayNameContent = (
|
||||||
<React.Fragment>
|
<>
|
||||||
{displayName}
|
{displayName}
|
||||||
{!field.is_required && (
|
{!field.is_required && (
|
||||||
<span className='light'>
|
<span className='light'>
|
||||||
{' (optional)'}
|
{' (optional)'}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
const helpText = field.description;
|
const helpText = field.description;
|
||||||
let helpTextContent: React.ReactNode = <Markdown message={helpText}/>;
|
let helpTextContent: React.ReactNode = <Markdown message={helpText}/>;
|
||||||
if (errorText) {
|
if (errorText) {
|
||||||
helpTextContent = (
|
helpTextContent = (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Markdown message={helpText}/>
|
<Markdown message={helpText}/>
|
||||||
<div className='error-text mt-3'>
|
<div className='error-text mt-3'>
|
||||||
{errorText}
|
{errorText}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ export default class BrowseChannels extends React.PureComponent<Props, State> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const body = this.state.loading ? <LoadingScreen/> : (
|
const body = this.state.loading ? <LoadingScreen/> : (
|
||||||
<React.Fragment>
|
<>
|
||||||
<SearchableChannelList
|
<SearchableChannelList
|
||||||
channels={this.activeChannels}
|
channels={this.activeChannels}
|
||||||
channelsPerPage={CHANNELS_PER_PAGE}
|
channelsPerPage={CHANNELS_PER_PAGE}
|
||||||
@@ -359,7 +359,7 @@ export default class BrowseChannels extends React.PureComponent<Props, State> {
|
|||||||
channelsMemberCount={this.props.channelsMemberCount}
|
channelsMemberCount={this.props.channelsMemberCount}
|
||||||
/>
|
/>
|
||||||
{serverError}
|
{serverError}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
const title = (
|
const title = (
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const ChannelHeaderTitleDirect = ({
|
|||||||
const displayName = displayUsername(dmUser, teammateNameDisplaySetting);
|
const displayName = displayUsername(dmUser, teammateNameDisplaySetting);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{currentUser.id !== dmUser?.id && displayName + ' '}
|
{currentUser.id !== dmUser?.id && displayName + ' '}
|
||||||
{currentUser.id === dmUser?.id &&
|
{currentUser.id === dmUser?.id &&
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -34,7 +34,7 @@ const ChannelHeaderTitleDirect = ({
|
|||||||
values={{displayName}}
|
values={{displayName}}
|
||||||
/>}
|
/>}
|
||||||
{isGuest(dmUser?.roles ?? '') && <GuestTag/>}
|
{isGuest(dmUser?.roles ?? '') && <GuestTag/>}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const ChannelHeaderTitleGroup = ({
|
|||||||
const displayNames = channel.display_name.split(', ');
|
const displayNames = channel.display_name.split(', ');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{displayNames.map((displayName, index) => {
|
{displayNames.map((displayName, index) => {
|
||||||
if (!membersMap[displayName]) {
|
if (!membersMap[displayName]) {
|
||||||
return displayName;
|
return displayName;
|
||||||
@@ -64,7 +64,7 @@ const ChannelHeaderTitleGroup = ({
|
|||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<MenuItemToggleInfo
|
<MenuItemToggleInfo
|
||||||
show={channel.type !== Constants.DM_CHANNEL && channel.type !== Constants.GM_CHANNEL}
|
show={channel.type !== Constants.DM_CHANNEL && channel.type !== Constants.GM_CHANNEL}
|
||||||
channel={channel}
|
channel={channel}
|
||||||
@@ -344,7 +344,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
|||||||
/>
|
/>
|
||||||
</ChannelPermissionGate>
|
</ChannelPermissionGate>
|
||||||
</Menu.Group>
|
</Menu.Group>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ const ChannelNameFormField = (props: Props): JSX.Element => {
|
|||||||
}, [displayNameError, urlError]);
|
}, [displayNameError, urlError]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Input
|
<Input
|
||||||
type='text'
|
type='text'
|
||||||
autoComplete='off'
|
autoComplete='off'
|
||||||
@@ -144,7 +144,7 @@ const ChannelNameFormField = (props: Props): JSX.Element => {
|
|||||||
error={urlError || props.urlError}
|
error={urlError || props.urlError}
|
||||||
onChange={handleOnURLChange}
|
onChange={handleOnURLChange}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ const ConvertGmToChannelModal = (props: Props) => {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
subBody = (
|
subBody = (
|
||||||
<React.Fragment>
|
<>
|
||||||
<WarningTextSection channelMemberNames={channelMemberNames}/>
|
<WarningTextSection channelMemberNames={channelMemberNames}/>
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -199,7 +199,7 @@ const ConvertGmToChannelModal = (props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default class FileProgressPreview extends React.PureComponent<Props> {
|
|||||||
previewImage = <div className={'file-icon ' + Utils.getIconClassName(fileType)}/>;
|
previewImage = <div className={'file-icon ' + Utils.getIconClassName(fileType)}/>;
|
||||||
|
|
||||||
fileNameComponent = (
|
fileNameComponent = (
|
||||||
<React.Fragment>
|
<>
|
||||||
<FilenameOverlay
|
<FilenameOverlay
|
||||||
fileInfo={fileInfo}
|
fileInfo={fileInfo}
|
||||||
compactDisplay={false}
|
compactDisplay={false}
|
||||||
@@ -50,16 +50,16 @@ export default class FileProgressPreview extends React.PureComponent<Props> {
|
|||||||
defaultMessage='Processing...'
|
defaultMessage='Processing...'
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<React.Fragment>
|
<>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='admin.plugin.uploading'
|
id='admin.plugin.uploading'
|
||||||
defaultMessage='Uploading...'
|
defaultMessage='Uploading...'
|
||||||
/>
|
/>
|
||||||
<span>{percentTxt}</span>
|
<span>{percentTxt}</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (percent) {
|
if (percent) {
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default class Bots extends React.PureComponent<Props, State> {
|
|||||||
return React.cloneElement(child, {filter: props.filter});
|
return React.cloneElement(child, {filter: props.filter});
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div className='bot-disabled'>
|
<div className='bot-disabled'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='bots.disabled'
|
id='bots.disabled'
|
||||||
@@ -161,7 +161,7 @@ export default class Bots extends React.PureComponent<Props, State> {
|
|||||||
<div className='bot-list__disabled'>
|
<div className='bot-list__disabled'>
|
||||||
{botsToDisplay}
|
{botsToDisplay}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ export default class Bots extends React.PureComponent<Props, State> {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
helpText={
|
helpText={
|
||||||
<React.Fragment>
|
<>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='bots.manage.help1'
|
id='bots.manage.help1'
|
||||||
defaultMessage='Use {botAccounts} to integrate with Mattermost through plugins or the API. Bot accounts are available to everyone on your server. '
|
defaultMessage='Use {botAccounts} to integrate with Mattermost through plugins or the API. Bot accounts are available to everyone on your server. '
|
||||||
@@ -269,7 +269,7 @@ export default class Bots extends React.PureComponent<Props, State> {
|
|||||||
a: (chunks: string) => <Link to='/admin_console/integrations/bot_accounts'>{chunks}</Link>,
|
a: (chunks: string) => <Link to='/admin_console/integrations/bot_accounts'>{chunks}</Link>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
}
|
}
|
||||||
searchPlaceholder={Utils.localizeMessage({id: 'bots.manage.search', defaultMessage: 'Search Bot Accounts'})}
|
searchPlaceholder={Utils.localizeMessage({id: 'bots.manage.search', defaultMessage: 'Search Bot Accounts'})}
|
||||||
loading={this.state.loading}
|
loading={this.state.loading}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default class DialogElement extends React.PureComponent<Props, State> {
|
|||||||
let displayNameContent: React.ReactNode = displayName;
|
let displayNameContent: React.ReactNode = displayName;
|
||||||
if (optional) {
|
if (optional) {
|
||||||
displayNameContent = (
|
displayNameContent = (
|
||||||
<React.Fragment>
|
<>
|
||||||
{displayName + ' '}
|
{displayName + ' '}
|
||||||
<span className='font-weight--normal light'>
|
<span className='font-weight--normal light'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -129,26 +129,26 @@ export default class DialogElement extends React.PureComponent<Props, State> {
|
|||||||
defaultMessage='(optional)'
|
defaultMessage='(optional)'
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
displayNameContent = (
|
displayNameContent = (
|
||||||
<React.Fragment>
|
<>
|
||||||
{displayName}
|
{displayName}
|
||||||
<span className='error-text'>{' *'}</span>
|
<span className='error-text'>{' *'}</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let helpTextContent: React.ReactNode = helpText;
|
let helpTextContent: React.ReactNode = helpText;
|
||||||
if (errorText) {
|
if (errorText) {
|
||||||
helpTextContent = (
|
helpTextContent = (
|
||||||
<React.Fragment>
|
<>
|
||||||
{helpText}
|
{helpText}
|
||||||
<div className='error-text mt-3'>
|
<div className='error-text mt-3'>
|
||||||
{errorText}
|
{errorText}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export default function AddToChannels(props: Props) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{props.customMessage.open && (
|
{props.customMessage.open && (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div className={'AddToChannels__customMessageTitle ' + props.titleClass}>
|
<div className={'AddToChannels__customMessageTitle ' + props.titleClass}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='invitation_modal.guests.custom-message.title'
|
id='invitation_modal.guests.custom-message.title'
|
||||||
@@ -159,7 +159,7 @@ export default function AddToChannels(props: Props) {
|
|||||||
onChange={(e) => props.setCustomMessage(e.target.value)}
|
onChange={(e) => props.setCustomMessage(e.target.value)}
|
||||||
value={props.customMessage.message}
|
value={props.customMessage.message}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ function KeyboardShortcutSequence({shortcut, hideDescription, hoistDescription,
|
|||||||
));
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<span>{'\t|\t'}</span>
|
<span>{'\t|\t'}</span>
|
||||||
{shortcutKeys}
|
{shortcutKeys}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default class LinkTooltip extends React.PureComponent<Props, State> {
|
|||||||
'data-channel-mention': attributes['data-channel-mention'],
|
'data-channel-mention': attributes['data-channel-mention'],
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{ReactDOM.createPortal(
|
{ReactDOM.createPortal(
|
||||||
<div
|
<div
|
||||||
style={tooltipContainerStyles}
|
style={tooltipContainerStyles}
|
||||||
@@ -132,7 +132,7 @@ export default class LinkTooltip extends React.PureComponent<Props, State> {
|
|||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,9 +378,9 @@ export class CombinedSystemMessage extends React.PureComponent<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{content}
|
{content}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,13 +156,13 @@ export default class PostBodyAdditionalContent extends React.PureComponent<Props
|
|||||||
if (hasValidEmbeddedBinding(this.props.post.props)) {
|
if (hasValidEmbeddedBinding(this.props.post.props)) {
|
||||||
// TODO Put some log / message if the form is not valid?
|
// TODO Put some log / message if the form is not valid?
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
<EmbeddedBindings
|
<EmbeddedBindings
|
||||||
embeds={this.props.post.props.app_bindings}
|
embeds={this.props.post.props.app_bindings}
|
||||||
post={this.props.post}
|
post={this.props.post}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const PostImage = ({
|
|||||||
imageMetadata={imageMetadata}
|
imageMetadata={imageMetadata}
|
||||||
>
|
>
|
||||||
{(safeLink) => (
|
{(safeLink) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<SizeAwareImage
|
<SizeAwareImage
|
||||||
className='img-div attachment__image cursor--pointer'
|
className='img-div attachment__image cursor--pointer'
|
||||||
src={safeLink}
|
src={safeLink}
|
||||||
@@ -72,7 +72,7 @@ const PostImage = ({
|
|||||||
showLoader={true}
|
showLoader={true}
|
||||||
onClick={showModal}
|
onClick={showModal}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</ExternalImage>
|
</ExternalImage>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ export default class PostList extends React.PureComponent<Props, State> {
|
|||||||
aria-label={Utils.localizeMessage({id: 'accessibility.sections.centerContent', defaultMessage: 'message list main region'})}
|
aria-label={Utils.localizeMessage({id: 'accessibility.sections.centerContent', defaultMessage: 'message list main region'})}
|
||||||
>
|
>
|
||||||
{this.props.isMobileView && (
|
{this.props.isMobileView && (
|
||||||
<React.Fragment>
|
<>
|
||||||
<FloatingTimestamp
|
<FloatingTimestamp
|
||||||
isScrolling={this.state.isScrolling}
|
isScrolling={this.state.isScrolling}
|
||||||
postId={this.state.topPostId}
|
postId={this.state.topPostId}
|
||||||
@@ -693,7 +693,7 @@ export default class PostList extends React.PureComponent<Props, State> {
|
|||||||
atBottom={Boolean(this.state.atBottom)}
|
atBottom={Boolean(this.state.atBottom)}
|
||||||
onClick={this.scrollToBottom}
|
onClick={this.scrollToBottom}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
className='post-list-holder-by-time'
|
className='post-list-holder-by-time'
|
||||||
@@ -709,7 +709,7 @@ export default class PostList extends React.PureComponent<Props, State> {
|
|||||||
<LatestPostReader postIds={this.props.postListIds}/>
|
<LatestPostReader postIds={this.props.postListIds}/>
|
||||||
<AutoSizer>
|
<AutoSizer>
|
||||||
{({height, width}) => (
|
{({height, width}) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<Pluggable
|
<Pluggable
|
||||||
pluggableName='ChannelToast'
|
pluggableName='ChannelToast'
|
||||||
@@ -740,7 +740,7 @@ export default class PostList extends React.PureComponent<Props, State> {
|
|||||||
>
|
>
|
||||||
{this.renderRow}
|
{this.renderRow}
|
||||||
</DynamicSizeList>
|
</DynamicSizeList>
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</AutoSizer>
|
</AutoSizer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default class PostReaction extends React.PureComponent<Props, State> {
|
|||||||
teamId={teamId}
|
teamId={teamId}
|
||||||
permissions={[Permissions.ADD_REACTION]}
|
permissions={[Permissions.ADD_REACTION]}
|
||||||
>
|
>
|
||||||
<React.Fragment>
|
<>
|
||||||
<EmojiPickerOverlay
|
<EmojiPickerOverlay
|
||||||
show={showEmojiPicker}
|
show={showEmojiPicker}
|
||||||
target={this.props.getDotMenuRef}
|
target={this.props.getDotMenuRef}
|
||||||
@@ -107,7 +107,7 @@ export default class PostReaction extends React.PureComponent<Props, State> {
|
|||||||
<EmojiIcon className='icon icon--small'/>
|
<EmojiIcon className='icon icon--small'/>
|
||||||
</button>
|
</button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
</React.Fragment>
|
</>
|
||||||
</ChannelPermissionGate>
|
</ChannelPermissionGate>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,13 +99,13 @@ export default class PostRecentReactions extends React.PureComponent<Props, Stat
|
|||||||
placement='top'
|
placement='top'
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<React.Fragment>
|
<>
|
||||||
<EmojiItem
|
<EmojiItem
|
||||||
emoji={emoji}
|
emoji={emoji}
|
||||||
onItemClick={this.handleToggleEmoji}
|
onItemClick={this.handleToggleEmoji}
|
||||||
order={n}
|
order={n}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
</div>
|
</div>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
</ChannelPermissionGate>
|
</ChannelPermissionGate>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const MaxLengthInput: FC<InputProps> = forwardRef<HTMLInputElement, InputProps>(
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<>
|
||||||
<input
|
<input
|
||||||
className={classes}
|
className={classes}
|
||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
@@ -38,7 +38,7 @@ const MaxLengthInput: FC<InputProps> = forwardRef<HTMLInputElement, InputProps>(
|
|||||||
{excess}
|
{excess}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</Fragment>
|
</>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const SearchHint = (props: Props): JSX.Element => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{props.withTitle && (!props.searchType) &&
|
{props.withTitle && (!props.searchType) &&
|
||||||
<h4 className='search-hint__title'>
|
<h4 className='search-hint__title'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -154,7 +154,7 @@ const SearchHint = (props: Props): JSX.Element => {
|
|||||||
</div>
|
</div>
|
||||||
</li>))}
|
</li>))}
|
||||||
</ul>
|
</ul>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -210,9 +210,9 @@ export default class Sidebar extends React.PureComponent<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{moreDirectChannelsModal}
|
{moreDirectChannelsModal}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Draggable
|
<Draggable
|
||||||
draggableId={`NEW_CHANNEL_SPACER__${category.id}`}
|
draggableId={`NEW_CHANNEL_SPACER__${category.id}`}
|
||||||
isDragDisabled={true}
|
isDragDisabled={true}
|
||||||
@@ -212,7 +212,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
|||||||
const addHelpLabel = localizeMessage({id: 'sidebar.createDirectMessage', defaultMessage: 'Create new direct message'});
|
const addHelpLabel = localizeMessage({id: 'sidebar.createDirectMessage', defaultMessage: 'Create new direct message'});
|
||||||
|
|
||||||
categoryMenu = (
|
categoryMenu = (
|
||||||
<React.Fragment>
|
<>
|
||||||
<SidebarCategorySortingMenu
|
<SidebarCategorySortingMenu
|
||||||
category={category}
|
category={category}
|
||||||
handleOpenDirectMessagesModal={this.handleOpenDirectMessagesModal}
|
handleOpenDirectMessagesModal={this.handleOpenDirectMessagesModal}
|
||||||
@@ -297,7 +297,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
|||||||
<i className='icon-plus'/>
|
<i className='icon-plus'/>
|
||||||
</button>
|
</button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!channelIds || !channelIds.length) {
|
if (!channelIds || !channelIds.length) {
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ export default class SizeAwareImage extends React.PureComponent<Props, State> {
|
|||||||
const shouldShowImg = !this.dimensionsAvailable(dimensions) || this.state.loaded;
|
const shouldShowImg = !this.dimensionsAvailable(dimensions) || this.state.loaded;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{fallback}
|
{fallback}
|
||||||
<div
|
<div
|
||||||
className='file-preview__button'
|
className='file-preview__button'
|
||||||
@@ -454,7 +454,7 @@ export default class SizeAwareImage extends React.PureComponent<Props, State> {
|
|||||||
>
|
>
|
||||||
{this.renderImageWithContainerIfNeeded()}
|
{this.renderImageWithContainerIfNeeded()}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -514,9 +514,9 @@ export class ToastWrapperClass extends React.PureComponent<Props, State> {
|
|||||||
const toastToRender = this.getToastToRender();
|
const toastToRender = this.getToastToRender();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{toastToRender}
|
{toastToRender}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ export default function ColorChooser(props: Props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<label className='custom-label'>{props.label}</label>
|
<label className='custom-label'>{props.label}</label>
|
||||||
<ColorInput
|
<ColorInput
|
||||||
id={props.id}
|
id={props.id}
|
||||||
value={props.value}
|
value={props.value}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,11 +130,11 @@ export default class ChannelsInput<T extends Channel> extends React.PureComponen
|
|||||||
icon = <PrivateChannelIcon className='private-channel-icon'/>;
|
icon = <PrivateChannelIcon className='private-channel-icon'/>;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{icon}
|
{icon}
|
||||||
{channel.display_name}
|
{channel.display_name}
|
||||||
<span className='channel-name'>{channel.name}</span>
|
<span className='channel-name'>{channel.name}</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default class UsersEmailsInput extends React.PureComponent<Props, State>
|
|||||||
return this.getCreateLabel((user as EmailInvite).value);
|
return this.getCreateLabel((user as EmailInvite).value);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Avatar
|
<Avatar
|
||||||
size='lg'
|
size='lg'
|
||||||
username={(user as UserProfile).username}
|
username={(user as UserProfile).username}
|
||||||
@@ -160,21 +160,21 @@ export default class UsersEmailsInput extends React.PureComponent<Props, State>
|
|||||||
{this.renderUserName(user as UserProfile)}
|
{this.renderUserName(user as UserProfile)}
|
||||||
{botBadge}
|
{botBadge}
|
||||||
{guestBadge}
|
{guestBadge}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((user as EmailInvite).value && isEmail((user as EmailInvite).value)) {
|
if ((user as EmailInvite).value && isEmail((user as EmailInvite).value)) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<MailIcon className='mail-icon'/>
|
<MailIcon className='mail-icon'/>
|
||||||
<span>{(user as EmailInvite).value}</span>
|
<span>{(user as EmailInvite).value}</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Avatar
|
<Avatar
|
||||||
size='sm'
|
size='sm'
|
||||||
username={(user as UserProfile).username}
|
username={(user as UserProfile).username}
|
||||||
@@ -183,7 +183,7 @@ export default class UsersEmailsInput extends React.PureComponent<Props, State>
|
|||||||
{getDisplayName(user as UserProfile)}
|
{getDisplayName(user as UserProfile)}
|
||||||
{botBadge}
|
{botBadge}
|
||||||
{guestBadge}
|
{guestBadge}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ export default class UsersEmailsInput extends React.PureComponent<Props, State>
|
|||||||
};
|
};
|
||||||
|
|
||||||
getCreateLabel = (value: string) => (
|
getCreateLabel = (value: string) => (
|
||||||
<React.Fragment>
|
<>
|
||||||
<MailPlusIcon className='mail-plus-icon'/>
|
<MailPlusIcon className='mail-plus-icon'/>
|
||||||
<FormattedMarkdownMessage
|
<FormattedMarkdownMessage
|
||||||
key='widgets.users_emails_input.valid_email'
|
key='widgets.users_emails_input.valid_email'
|
||||||
@@ -211,7 +211,7 @@ export default class UsersEmailsInput extends React.PureComponent<Props, State>
|
|||||||
values={{email: value}}
|
values={{email: value}}
|
||||||
disableLinks={true}
|
disableLinks={true}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
Input = (props: InputProps) => {
|
Input = (props: InputProps) => {
|
||||||
|
|||||||
@@ -159,10 +159,10 @@ export default class SubMenuItem extends React.PureComponent<Props, State> {
|
|||||||
let textProp = text;
|
let textProp = text;
|
||||||
if (icon) {
|
if (icon) {
|
||||||
textProp = (
|
textProp = (
|
||||||
<React.Fragment>
|
<>
|
||||||
<span className={classNames(['icon', {'sorting-menu-icon': styleSelectableItem}])}>{icon}</span>
|
<span className={classNames(['icon', {'sorting-menu-icon': styleSelectableItem}])}>{icon}</span>
|
||||||
{textProp}
|
{textProp}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ class ChannelHeaderPlug extends React.PureComponent<ChannelHeaderPlugProps, Chan
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<React.Fragment>
|
<>
|
||||||
<PluginChannelHeaderIcon
|
<PluginChannelHeaderIcon
|
||||||
id='pluginChannelHeaderIcon'
|
id='pluginChannelHeaderIcon'
|
||||||
className='icon icon--standard icon__pluginChannelHeader'
|
className='icon icon--standard icon__pluginChannelHeader'
|
||||||
@@ -350,7 +350,7 @@ class ChannelHeaderPlug extends React.PureComponent<ChannelHeaderPlugProps, Chan
|
|||||||
>
|
>
|
||||||
{items.length}
|
{items.length}
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
</>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
</CustomToggle>
|
</CustomToggle>
|
||||||
<CustomMenu
|
<CustomMenu
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ export default function Pluggable(props: Props): JSX.Element | null {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{content}
|
{content}
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user