/** * * EditForm * */ import React from 'react'; import PropTypes from 'prop-types'; import { get } from 'lodash'; import { InputsIndex as Input, LoadingIndicator } from 'strapi-helper-plugin'; import { Wrapper } from './Components'; function EditForm({ onChange, showLoaders, values }) { const { roles, settings } = values; const generateSelectOptions = () => Object.keys(get(values, 'roles', [])).reduce((acc, current) => { const option = { id: get(roles, [current, 'name']), value: get(roles, [current, 'type']), }; acc.push(option); return acc; }, []); return ( {showLoaders ? ( ) : (
)}
); } EditForm.propTypes = { onChange: PropTypes.func.isRequired, showLoaders: PropTypes.bool.isRequired, values: PropTypes.object.isRequired, }; export default EditForm;