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.');
// 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';
onClick: () => void;
}
-const mapDispatchToProps = (dispatch: Dispatch): ProjectDetailsComponentActionProps => ({
- onClick: () => dispatch<any>(openProjectPropertiesDialog())
-});
+const mapDispatchToProps = ({ onClick: openProjectPropertiesDialog });
type ProjectDetailsComponentProps = ProjectDetailsComponentDataProps & ProjectDetailsComponentActionProps & WithStyles<CssRules>;