From 0a0db4ca8433ae210df5cf1475dd2b77e4aabec9 Mon Sep 17 00:00:00 2001 From: Janicki Artur Date: Fri, 16 Nov 2018 17:08:19 +0100 Subject: [PATCH] change code after CR Feature #14433_properties_inside_projects Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- src/store/details-panel/details-panel-action.ts | 1 - src/views-components/details-panel/project-details.tsx | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/store/details-panel/details-panel-action.ts b/src/store/details-panel/details-panel-action.ts index cd9ab4b1..6aebc050 100644 --- a/src/store/details-panel/details-panel-action.ts +++ b/src/store/details-panel/details-panel-action.ts @@ -42,7 +42,6 @@ export const deleteProjectProperty = (key: string) => dispatch(resourcesActions.SET_RESOURCES([updatedProject])); dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Property has been successfully deleted.", hideDuration: 2000 })); } - return; } catch (e) { dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_PROPERTIES_FORM_NAME })); throw new Error('Could not remove property from the project.'); diff --git a/src/views-components/details-panel/project-details.tsx b/src/views-components/details-panel/project-details.tsx index e9952910..91c5e027 100644 --- a/src/views-components/details-panel/project-details.tsx +++ b/src/views-components/details-panel/project-details.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { Dispatch } from 'redux'; +import { compose } from 'redux'; import { connect } from 'react-redux'; import { openProjectPropertiesDialog } from '~/store/details-panel/details-panel-action'; import { ProjectIcon, RenameIcon } from '~/components/icon/icon'; @@ -49,9 +49,7 @@ interface ProjectDetailsComponentActionProps { onClick: () => void; } -const mapDispatchToProps = (dispatch: Dispatch): ProjectDetailsComponentActionProps => ({ - onClick: () => dispatch(openProjectPropertiesDialog()) -}); +const mapDispatchToProps = ({ onClick: openProjectPropertiesDialog }); type ProjectDetailsComponentProps = ProjectDetailsComponentDataProps & ProjectDetailsComponentActionProps & WithStyles; -- 2.30.2