map(take(this.props.form.items, 1), (input, key) => ( <Input key={key} customBootstrapClass="col-md-6 offset-md-6 mr-md-5" type={input.type} value={get(this.props.values, ['params', input.name.split('.')[1]])} name={input.name} label={input.label} title={input.title} validations={input.validations} inputDescription={input.inputDescription} {...this.props} /> ))
function* getArticles() { try { const articles = yield call(fetchArticles); const posts = articles.posts.reduce((acc, curr) => { // Limit to 200 characters and remove last word. const content = dropRight(take(removeMd(curr.markdown), 250).join('').split(' ')).join(' '); acc.push({ title: curr.title, link: curr.slug, content: `${content} [...]`, }); return acc; }, []); yield put(getArticlesSucceeded(posts)); } catch(err) { // Silent } }
map(take(form, 3), (value, key) => ( <Input autoFocus={key === 0} key={value} didCheckErrors={this.props.didCheckErrors} errors={get(this.props.formErrors, [findIndex(this.props.formErrors, ['name', value]), 'errors'], [])} label={{ id: `users-permissions.PopUpForm.Email.${value}.label` }} name={`${settingType}.${dataToEdit}.${value}`} onChange={this.props.onChange} placeholder={`users-permissions.PopUpForm.Email.${value}.placeholder`} type={includes(value, 'email') ? 'email' : 'text'} value={get(values, value)} validations={value !== 'options.response_email' ? { required: true } : {}} /> ))
const baseUrl = join(take(this.props.path.split('/'), 4), '/'); const component = this.props.renderListComponent ? <List {...this.props} /> : <EditForm {...this.props} />; let linkColor = '#F5F5F5';