mirror of
https://github.com/strapi/strapi.git
synced 2025-11-08 06:07:41 +00:00
Upgrade react and fix warnings
This commit is contained in:
parent
dd5e84d80a
commit
7828248150
@ -20,15 +20,15 @@ function LeftMenuLinkContainer({ plugins }) {
|
|||||||
plugin.leftMenuSections.map((leftMenuSection, j) => {
|
plugin.leftMenuSections.map((leftMenuSection, j) => {
|
||||||
|
|
||||||
if (size(get(leftMenuSection, 'links')) === 0) {
|
if (size(get(leftMenuSection, 'links')) === 0) {
|
||||||
return <div />;
|
return <div key="emptyDiv" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={j}>
|
<div key={j}>
|
||||||
<p className={styles.title}>{leftMenuSection.name}</p>
|
<p className={styles.title}>{leftMenuSection.name}</p>
|
||||||
<ul className={styles.list}>
|
<ul className={styles.list}>
|
||||||
{leftMenuSection.links.map((link, k) =>
|
{leftMenuSection.links.map((link) =>
|
||||||
<LeftMenuLink key={k} icon={link.icon || 'link'} label={link.label} destination={`/plugins/${plugin.id}/${link.destination}`} />
|
<LeftMenuLink key={link.label} icon={link.icon || 'link'} label={link.label} destination={`/plugins/${plugin.id}/${link.destination}`} />
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -386,15 +386,9 @@ Input.propTypes = {
|
|||||||
label: PropTypes.string.isRequired,
|
label: PropTypes.string.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
noErrorsDescription: PropTypes.bool,
|
noErrorsDescription: PropTypes.bool,
|
||||||
onBlur: PropTypes.oneOfType([
|
onBlur: PropTypes.func,
|
||||||
PropTypes.func,
|
|
||||||
PropTypes.bool,
|
|
||||||
]),
|
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
onFocus: PropTypes.oneOfType([
|
onFocus: PropTypes.func,
|
||||||
PropTypes.bool,
|
|
||||||
PropTypes.func,
|
|
||||||
]),
|
|
||||||
placeholder: PropTypes.string,
|
placeholder: PropTypes.string,
|
||||||
selectOptions: PropTypes.array,
|
selectOptions: PropTypes.array,
|
||||||
selectOptionsFetchSucceeded: PropTypes.bool,
|
selectOptionsFetchSucceeded: PropTypes.bool,
|
||||||
@ -417,12 +411,12 @@ Input.defaultProps = {
|
|||||||
errors: [],
|
errors: [],
|
||||||
inputDescription: '',
|
inputDescription: '',
|
||||||
noErrorsDescription: false,
|
noErrorsDescription: false,
|
||||||
onBlur: false,
|
onBlur: () => {},
|
||||||
onFocus: false,
|
onFocus: () => {},
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
selectOptionsFetchSucceeded: false,
|
selectOptionsFetchSucceeded: false,
|
||||||
value: ''
|
value: ''
|
||||||
}
|
};
|
||||||
|
|
||||||
export default Input;
|
export default Input;
|
||||||
|
|||||||
@ -90,9 +90,9 @@
|
|||||||
"postcss-smart-import": "^0.7.5",
|
"postcss-smart-import": "^0.7.5",
|
||||||
"precss": "^2.0.0",
|
"precss": "^2.0.0",
|
||||||
"prettier": "^1.5.3",
|
"prettier": "^1.5.3",
|
||||||
"react": "^15.6.2",
|
"react": "^16.0.0-rc.3",
|
||||||
"react-datetime": "^2.8.6",
|
"react-datetime": "^2.8.6",
|
||||||
"react-dom": "^15.6.2",
|
"react-dom": "^16.0.0-rc.3",
|
||||||
"react-helmet": "^5.1.3",
|
"react-helmet": "^5.1.3",
|
||||||
"react-intl": "^2.3.0",
|
"react-intl": "^2.3.0",
|
||||||
"react-redux": "^5.0.6",
|
"react-redux": "^5.0.6",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user