diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/base-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/base-dialog/index.tsx index e76b6306..8643b0d7 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/base-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/base-dialog/index.tsx @@ -8,7 +8,6 @@ import GlobalError from "../../../form/global-error"; export type DialogProps = { onClose: () => void; onSubmit?: (event: React.FormEvent) => void; - open: boolean; children: any; error?: ErrorInfo; @@ -21,8 +20,6 @@ const BaseDialog = (props: DialogProps) => { const intl = useIntl(); const handleOnClose = props.onClose; const onSubmit = props.onSubmit; - const isOpen = props.open; - const handleOnSubmit = (e: React.FormEvent) => { e.preventDefault(); @@ -36,7 +33,7 @@ const BaseDialog = (props: DialogProps) => { return (
diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx index 6b4c1060..2968de6b 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx @@ -25,7 +25,6 @@ const CreateDialog = (props: CreateProps) => { const client: Client = useSelector(activeInstance); const [model, setModel] = React.useState(defaultModel); const [error, setError] = React.useState(); - const { open } = props; const intl = useIntl(); const mutation = useMutation((model: CreateModel) => { @@ -62,7 +61,7 @@ const CreateDialog = (props: CreateProps) => { return (
- diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/delete-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/delete-dialog/index.tsx index 4b898678..3761d52d 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/delete-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/delete-dialog/index.tsx @@ -34,7 +34,7 @@ const DeleteDialog = (props: DialogProps) => { return (
diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx index 0c2dbbd6..e2156939 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/duplicate-dialog/index.tsx @@ -71,7 +71,7 @@ const DuplicateDialog = (props: DialogProps) => { return (
- diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/history-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/history-dialog/index.tsx index 7e3a715c..f170402a 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/history-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/history-dialog/index.tsx @@ -1,10 +1,10 @@ import React, { ErrorInfo } from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { useMutation, useQuery, useQueryClient } from "react-query"; +import { useQuery } from "react-query"; import { useSelector } from "react-redux"; import Client, { ChangeHistory } from "../../../../client"; import { activeInstance } from '../../../../redux/clientSlice'; -import { DialogProps, fetchMapById, handleOnMutationSuccess } from ".."; +import { DialogProps } from ".."; import BaseDialog from "../base-dialog"; import { Link, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip } from "@material-ui/core"; import moment from "moment"; @@ -36,7 +36,7 @@ const HistoryDialog = (props: DialogProps) => { return (
diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/index.tsx index 6957da02..f47b4878 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/index.tsx @@ -37,17 +37,18 @@ const ActionDispatcher = (props: ActionDialogProps) => { window.location.href = `/c/maps/${mapId}/edit`; break; case 'print': - window.open(`/c/maps/${mapId}/print`,'print'); + window.open(`/c/maps/${mapId}/print`, 'print'); break; } return ( - - - - - + + {action === 'create' ? : null} + {action === 'delete' ? : null} + {action === 'rename' ? : null} + {action === 'duplicate' ? : null} + {action === 'history' ? : null} ); } diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx index f8c9ae88..ec462220 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/rename-dialog/index.tsx @@ -70,7 +70,7 @@ const RenameDialog = (props: DialogProps) => { return (
- @@ -83,7 +83,7 @@ const RenameDialog = (props: DialogProps) => { value={model.description} onChange={handleOnChange} required={false} fullWidth={true} /> -
+
); }