adding/removing-from-public-favorites
[arvados-workbench2.git] / src / views-components / project-properties / create-project-properties-list.tsx
index 1e98905cf20c0c9643ac0897969c3dbe7fbd3771..1d2050fe4c25343f2f903a7ab27a469bd972ec60 100644 (file)
@@ -5,10 +5,9 @@
 import * as React from 'react';
 import { connect } from 'react-redux';
 import { Dispatch } from 'redux';
-import { formValueSelector } from 'redux-form';
 import { withStyles, StyleRulesCallback, WithStyles, Chip } from '@material-ui/core';
 import { RootState } from '~/store/store';
-import { removePropertyFromCreateProjectForm, PROJECT_CREATE_FORM_NAME } from '~/store/projects/project-create-actions';
+import { removePropertyFromCreateProjectForm, PROJECT_CREATE_FORM_SELECTOR, ProjectProperties } from '~/store/projects/project-create-actions';
 import { ArvadosTheme } from '~/common/custom-theme';
 
 type CssRules = 'tag';
@@ -21,16 +20,15 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 });
 
 interface CreateProjectPropertiesListDataProps {
-    properties: any;
+    properties: ProjectProperties;
 }
 
 interface CreateProjectPropertiesListActionProps {
     handleDelete: (key: string) => void;
 }
 
-const selector = formValueSelector(PROJECT_CREATE_FORM_NAME);
 const mapStateToProps = (state: RootState): CreateProjectPropertiesListDataProps => {
-    const properties = selector(state, 'properties');
+    const properties = PROJECT_CREATE_FORM_SELECTOR(state, 'properties');
     return { properties };
 };