mirror of
https://github.com/UA-Fediland/synapse-admin.git
synced 2024-11-21 22:11:27 +00:00
Replace Fragment
with short form
https://legacy.reactjs.org/docs/fragments.html#short-syntax Change-Id: Ib1af57fc5e87ded8c1fee38dcbd60fae8621cb07
This commit is contained in:
parent
6363e3d32e
commit
51def5775d
6 changed files with 23 additions and 27 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment } from "react";
|
||||
import React from "react";
|
||||
import FolderSharedIcon from "@mui/icons-material/FolderShared";
|
||||
import {
|
||||
BooleanField,
|
||||
|
@ -130,11 +130,7 @@ export const RoomDirectorySaveButton = () => {
|
|||
);
|
||||
};
|
||||
|
||||
const RoomDirectoryBulkActionButtons = () => (
|
||||
<Fragment>
|
||||
<RoomDirectoryBulkDeleteButton />
|
||||
</Fragment>
|
||||
);
|
||||
const RoomDirectoryBulkActionButtons = () => <RoomDirectoryBulkDeleteButton />;
|
||||
|
||||
const RoomDirectoryListActions = () => (
|
||||
<TopToolbar>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment, useState } from "react";
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
Button,
|
||||
SaveButton,
|
||||
|
@ -93,7 +93,7 @@ export const ServerNoticeButton = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<>
|
||||
<Button
|
||||
label="resources.servernotices.send"
|
||||
onClick={handleDialogOpen}
|
||||
|
@ -106,7 +106,7 @@ export const ServerNoticeButton = () => {
|
|||
onClose={handleDialogClose}
|
||||
onSend={handleSend}
|
||||
/>
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -138,7 +138,7 @@ export const ServerNoticeBulkButton = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<>
|
||||
<Button
|
||||
label="resources.servernotices.send"
|
||||
onClick={handleDialogOpen}
|
||||
|
@ -151,6 +151,6 @@ export const ServerNoticeBulkButton = () => {
|
|||
onClose={handleDialogClose}
|
||||
onSend={handleSend}
|
||||
/>
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment, useState } from "react";
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
Button,
|
||||
useDelete,
|
||||
|
@ -41,7 +41,7 @@ export const DeviceRemoveButton = props => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<>
|
||||
<Button
|
||||
label="ra.action.remove"
|
||||
onClick={handleClick}
|
||||
|
@ -70,6 +70,6 @@ export const DeviceRemoveButton = props => {
|
|||
name: record.display_name ? record.display_name : record.id,
|
||||
}}
|
||||
/>
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment, useState } from "react";
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
BooleanInput,
|
||||
Button,
|
||||
|
@ -119,7 +119,7 @@ export const DeleteMediaButton = props => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<>
|
||||
<Button
|
||||
label="resources.delete_media.action.send"
|
||||
onClick={handleDialogOpen}
|
||||
|
@ -142,7 +142,7 @@ export const DeleteMediaButton = props => {
|
|||
onClose={handleDialogClose}
|
||||
onSend={handleSend}
|
||||
/>
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -193,7 +193,7 @@ export const ProtectMediaButton = props => {
|
|||
Wrapping Tooltip with <div>
|
||||
https://github.com/marmelab/react-admin/issues/4349#issuecomment-578594735
|
||||
*/
|
||||
<Fragment>
|
||||
<>
|
||||
{record.quarantined_by && (
|
||||
<Tooltip
|
||||
title={translate("resources.protect_media.action.none", {
|
||||
|
@ -238,7 +238,7 @@ export const ProtectMediaButton = props => {
|
|||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -285,7 +285,7 @@ export const QuarantineMediaButton = props => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<>
|
||||
{record.safe_from_quarantine && (
|
||||
<Tooltip
|
||||
title={translate("resources.quarantine_media.action.none", {
|
||||
|
@ -325,6 +325,6 @@ export const QuarantineMediaButton = props => {
|
|||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Fragment } from "react";
|
||||
import React from "react";
|
||||
import {
|
||||
BooleanField,
|
||||
BulkDeleteButton,
|
||||
|
@ -279,7 +279,7 @@ export const RoomShow = props => {
|
|||
};
|
||||
|
||||
const RoomBulkActionButtons = () => (
|
||||
<Fragment>
|
||||
<>
|
||||
<RoomDirectoryBulkSaveButton />
|
||||
<RoomDirectoryBulkDeleteButton />
|
||||
<BulkDeleteButton
|
||||
|
@ -287,7 +287,7 @@ const RoomBulkActionButtons = () => (
|
|||
confirmContent="resources.rooms.action.erase.content"
|
||||
mutationMode="pessimistic"
|
||||
/>
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
|
||||
const RoomFilter = props => (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { cloneElement, Fragment } from "react";
|
||||
import React, { cloneElement } from "react";
|
||||
import AssignmentIndIcon from "@mui/icons-material/AssignmentInd";
|
||||
import ContactMailIcon from "@mui/icons-material/ContactMail";
|
||||
import DevicesIcon from "@mui/icons-material/Devices";
|
||||
|
@ -138,7 +138,7 @@ const UserFilter = props => (
|
|||
);
|
||||
|
||||
const UserBulkActionButtons = props => (
|
||||
<Fragment>
|
||||
<>
|
||||
<ServerNoticeBulkButton {...props} />
|
||||
<BulkDeleteButton
|
||||
{...props}
|
||||
|
@ -146,7 +146,7 @@ const UserBulkActionButtons = props => (
|
|||
confirmTitle="resources.users.helper.erase"
|
||||
mutationMode="pessimistic"
|
||||
/>
|
||||
</Fragment>
|
||||
</>
|
||||
);
|
||||
|
||||
export const UserList = props => {
|
||||
|
|
Loading…
Reference in a new issue