Upgrade react and fix warnings

This commit is contained in:
cyril lopez 2017-10-16 09:52:47 +02:00
parent dd5e84d80a
commit 7828248150
3 changed files with 11 additions and 17 deletions

View File

@ -20,15 +20,15 @@ function LeftMenuLinkContainer({ plugins }) {
plugin.leftMenuSections.map((leftMenuSection, j) => {
if (size(get(leftMenuSection, 'links')) === 0) {
return <div />;
return <div key="emptyDiv" />;
}
return (
<div key={j}>
<p className={styles.title}>{leftMenuSection.name}</p>
<ul className={styles.list}>
{leftMenuSection.links.map((link, k) =>
<LeftMenuLink key={k} icon={link.icon || 'link'} label={link.label} destination={`/plugins/${plugin.id}/${link.destination}`} />
{leftMenuSection.links.map((link) =>
<LeftMenuLink key={link.label} icon={link.icon || 'link'} label={link.label} destination={`/plugins/${plugin.id}/${link.destination}`} />
)}
</ul>
</div>

View File

@ -386,15 +386,9 @@ Input.propTypes = {
label: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
noErrorsDescription: PropTypes.bool,
onBlur: PropTypes.oneOfType([
PropTypes.func,
PropTypes.bool,
]),
onBlur: PropTypes.func,
onChange: PropTypes.func.isRequired,
onFocus: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.func,
]),
onFocus: PropTypes.func,
placeholder: PropTypes.string,
selectOptions: PropTypes.array,
selectOptionsFetchSucceeded: PropTypes.bool,
@ -417,12 +411,12 @@ Input.defaultProps = {
errors: [],
inputDescription: '',
noErrorsDescription: false,
onBlur: false,
onFocus: false,
onBlur: () => {},
onFocus: () => {},
placeholder: '',
selectOptions: [],
selectOptionsFetchSucceeded: false,
value: ''
}
};
export default Input;

View File

@ -90,9 +90,9 @@
"postcss-smart-import": "^0.7.5",
"precss": "^2.0.0",
"prettier": "^1.5.3",
"react": "^15.6.2",
"react": "^16.0.0-rc.3",
"react-datetime": "^2.8.6",
"react-dom": "^15.6.2",
"react-dom": "^16.0.0-rc.3",
"react-helmet": "^5.1.3",
"react-intl": "^2.3.0",
"react-redux": "^5.0.6",
@ -115,4 +115,4 @@
"webpack-hot-middleware": "^2.18.2",
"whatwg-fetch": "^2.0.3"
}
}
}