Fix CSV import button (#154)
This commit is contained in:
parent
9f16e5c6ba
commit
e50c95b4be
@ -36,7 +36,6 @@ import {
|
||||
DeleteButton,
|
||||
SaveButton,
|
||||
regex,
|
||||
useRedirect,
|
||||
useTranslate,
|
||||
Pagination,
|
||||
CreateButton,
|
||||
@ -45,11 +44,12 @@ import {
|
||||
sanitizeListRestProps,
|
||||
NumberField,
|
||||
} from "react-admin";
|
||||
import { Link } from "react-router-dom";
|
||||
import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices";
|
||||
import { DeviceRemoveButton } from "./devices";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
|
||||
const redirect = (basePath, id, data) => {
|
||||
const redirect = () => {
|
||||
return {
|
||||
pathname: "/import_users",
|
||||
};
|
||||
@ -85,7 +85,6 @@ const UserListActions = ({
|
||||
total,
|
||||
...rest
|
||||
}) => {
|
||||
const redirectTo = useRedirect();
|
||||
return (
|
||||
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>
|
||||
{filters &&
|
||||
@ -106,12 +105,7 @@ const UserListActions = ({
|
||||
maxResults={maxResults}
|
||||
/>
|
||||
{/* Add your custom actions */}
|
||||
<Button
|
||||
onClick={() => {
|
||||
redirectTo(redirect);
|
||||
}}
|
||||
label="CSV Import"
|
||||
>
|
||||
<Button component={Link} to={redirect} label="CSV Import">
|
||||
<GetAppIcon style={{ transform: "rotate(180deg)", fontSize: "20" }} />
|
||||
</Button>
|
||||
</TopToolbar>
|
||||
|
Loading…
Reference in New Issue
Block a user