mirror of
https://github.com/UA-Fediland/synapse-admin.git
synced 2024-11-25 07:45:23 +00:00
Fix CSV import button (#154)
This commit is contained in:
parent
9f16e5c6ba
commit
e50c95b4be
1 changed files with 3 additions and 9 deletions
|
@ -36,7 +36,6 @@ import {
|
||||||
DeleteButton,
|
DeleteButton,
|
||||||
SaveButton,
|
SaveButton,
|
||||||
regex,
|
regex,
|
||||||
useRedirect,
|
|
||||||
useTranslate,
|
useTranslate,
|
||||||
Pagination,
|
Pagination,
|
||||||
CreateButton,
|
CreateButton,
|
||||||
|
@ -45,11 +44,12 @@ import {
|
||||||
sanitizeListRestProps,
|
sanitizeListRestProps,
|
||||||
NumberField,
|
NumberField,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices";
|
import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices";
|
||||||
import { DeviceRemoveButton } from "./devices";
|
import { DeviceRemoveButton } from "./devices";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
|
|
||||||
const redirect = (basePath, id, data) => {
|
const redirect = () => {
|
||||||
return {
|
return {
|
||||||
pathname: "/import_users",
|
pathname: "/import_users",
|
||||||
};
|
};
|
||||||
|
@ -85,7 +85,6 @@ const UserListActions = ({
|
||||||
total,
|
total,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
const redirectTo = useRedirect();
|
|
||||||
return (
|
return (
|
||||||
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>
|
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>
|
||||||
{filters &&
|
{filters &&
|
||||||
|
@ -106,12 +105,7 @@ const UserListActions = ({
|
||||||
maxResults={maxResults}
|
maxResults={maxResults}
|
||||||
/>
|
/>
|
||||||
{/* Add your custom actions */}
|
{/* Add your custom actions */}
|
||||||
<Button
|
<Button component={Link} to={redirect} label="CSV Import">
|
||||||
onClick={() => {
|
|
||||||
redirectTo(redirect);
|
|
||||||
}}
|
|
||||||
label="CSV Import"
|
|
||||||
>
|
|
||||||
<GetAppIcon style={{ transform: "rotate(180deg)", fontSize: "20" }} />
|
<GetAppIcon style={{ transform: "rotate(180deg)", fontSize: "20" }} />
|
||||||
</Button>
|
</Button>
|
||||||
</TopToolbar>
|
</TopToolbar>
|
||||||
|
|
Loading…
Reference in a new issue