Fix PR feedback

This commit is contained in:
cyril lopez 2018-03-23 17:11:10 +01:00
parent 340f06e053
commit 8be6df24b3
5 changed files with 13 additions and 16 deletions

View File

@ -136,7 +136,6 @@ class ImgPreview extends React.Component {
isPictureType = (fileName) => /\.(jpe?g|png|gif)$/i.test(fileName);
updateFilePosition = (newPosition) => {
// this.setState({ position: newPosition });
this.props.updateFilePosition(newPosition);
}

View File

@ -23,19 +23,20 @@
.editor {
min-height: 303px;
padding: 0px 10px 0 10px;
padding: 10px 20px 0 20px;
font-size: 16px;
margin-top: 10px;
background-color: #fff;
line-height: 18px !important;
cursor: text;
// TODO define rules for header's margin
h1, h2, h3, h4, h5, h6 {
margin: 0;
line-height: 18px !important;
}
h1 {
margin-top: -3px !important;
margin-bottom: 3px;
margin-top: 13px !important;
margin-bottom: 22px;
}
> div {
> div {
@ -50,6 +51,9 @@
ul, ol {
margin-bottom: 18px;
}
span {
white-space: pre-line;
}
}
.editorFocus {
@ -165,7 +169,7 @@
.fullscreenPreviewEditor {
margin-top: 9px;
padding: 0px 8px;
padding: 10px 20px;
}
.toggleModeButton {

View File

@ -5,13 +5,10 @@
*/
import React from 'react';
/* eslint-disable jsx-a11y/label-has-for */
// import PropTypes from 'prop-types';
import styles from './styles.scss';
/* eslint-disable jsx-a11y/label-has-for */
const WysiwygDropUpload = (props) => {
// console.log(props);
return (
<label
{...props}

View File

@ -171,8 +171,6 @@ export class EditPage extends React.Component {
this.props.setFormErrors(formErrors);
}
// layout = bindLayout.call(this, layout);
componentDidCatch(error, info) {
console.log('err', error);
console.log('info', info);

View File

@ -36,14 +36,13 @@ function* dataGet(action) {
try {
const modelName = yield select(makeSelectModelName());
const params = { source: action.source };
const response = yield [
const [response, layout] = yield [
call(request, `/content-manager/explorer/${modelName}/${action.id}`, { method: 'GET', params }),
call(request, '/content-manager/layout', { method: 'GET', params }),
];
const pluginHeaderTitle = yield call(templateObject, { mainField: action.mainField }, response[0]);
yield put(getDataSucceeded(action.id, response[0], pluginHeaderTitle.mainField));
yield put(getLayoutSucceeded(response[1]));
const pluginHeaderTitle = yield call(templateObject, { mainField: action.mainField }, response);
yield put(getDataSucceeded(action.id, response, pluginHeaderTitle.mainField));
yield put(getLayoutSucceeded(layout));
} catch(err) {
strapi.notification.error('content-manager.error.record.fetch');
}