New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin settings manager dev #227
Plugin settings manager dev #227
Conversation
…n/content-manager
…n/content-manager
Merge branch 'plugin/settings-manager-dev' of https://github.com/strapi/strapi into plugin/settings-manager-dev
…i into plugin/settings-manager-dev
…leftmenu active links
…pi/strapi into plugin/settings-manager-dev
…i into plugin/settings-manager-dev
Merge branch 'plugin/settings-manager-dev' of https://github.com/strapi/strapi into plugin/settings-manager-dev
* @param messages | ||
*/ | ||
const formatMessages = messages => reduce(messages, (result, value, key) => { | ||
const obj = result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to declare the obj
variable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint requirement.
* Dynamically generate `translationsMessages object`. | ||
*/ | ||
const translationMessages = reduce(window.Strapi.languages, (result, language) => { | ||
const obj = result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint requirement.
@@ -66,12 +66,12 @@ class InputNumber extends React.Component { // eslint-disable-line react/prefer- | |||
validate = (value) => { | |||
let errors = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The let
is needed.
}; | ||
} | ||
|
||
componentWillReceiveProps(nextProps) { | ||
if (nextProps.error !== this.props.error) { | ||
if (isEmpty(nextProps.formErrors)) this.setState({ modal: false, loader: false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this line with only one if
statement would be better
…pi/strapi into plugin/settings-manager-dev
LGTM. |
LGTM except that we need to remove the rule of ESLint that doesn't allow to update a function parameter... It makes no sense. |
No description provided.