Sha256: b4b898e796309572e7ebad030e1a392b06df0ec8096fff36970cccb33ed9ea93

Contents?: true

Size: 947 Bytes

Versions: 3

Compression:

Stored size: 947 Bytes

Contents

import { connect } from 'react-redux';

import * as FormActions from 'foremanReact/redux/actions/common/forms';

import { selectLayout } from 'foremanReact/components/Layout/LayoutSelectors';

import NewTemplateSyncForm from './NewTemplateSyncForm';

import {
  selectImportSettings,
  selectExportSettings,
} from '../../NewTemplateSyncSelectors';

import { selectInitialFormValues } from './NewTemplateSyncFormSelectors';

const mapStateToProps = (state, ownProps) => {
  const importSettings = selectImportSettings(state);

  const exportSettings = selectExportSettings(state);

  const initialFormValues = selectInitialFormValues(state);

  return {
    initialValues: { ...initialFormValues },
    importSettings,
    exportSettings,
    currentOrganization: selectLayout(state).currentOrganization,
    currentLocation: selectLayout(state).currentLocation,
  };
};

export default connect(mapStateToProps, FormActions)(NewTemplateSyncForm);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_templates-9.0.2 webpack/components/NewTemplateSync/components/NewTemplateSyncForm/index.js
foreman_templates-9.0.1 webpack/components/NewTemplateSync/components/NewTemplateSyncForm/index.js
foreman_templates-9.0.0 webpack/components/NewTemplateSync/components/NewTemplateSyncForm/index.js