mirror of
https://github.com/strapi/strapi.git
synced 2025-11-07 05:38:13 +00:00
pr review apply
This commit is contained in:
parent
7b28ebe3b5
commit
3d570a41f5
@ -5,18 +5,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { LeftMenu, LeftMenuList } from 'strapi-helper-plugin';
|
import { useGlobalContext, LeftMenu, LeftMenuList } from 'strapi-helper-plugin';
|
||||||
|
|
||||||
import Webhooks from '../Webhooks';
|
import Webhooks from '../Webhooks';
|
||||||
import Wrapper from './Wrapper';
|
import Wrapper from './Wrapper';
|
||||||
|
|
||||||
function SettingsPage() {
|
function SettingsPage() {
|
||||||
|
const { formatMessage } = useGlobalContext();
|
||||||
|
|
||||||
const menuItems = [
|
const menuItems = [
|
||||||
{
|
{
|
||||||
title: { id: 'app.components.LeftMenuLinkContainer.general' },
|
title: { id: 'app.components.LeftMenuLinkContainer.general' },
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
title: 'webhooks',
|
title: formatMessage({ id: `Settings.webhooks.title` }),
|
||||||
to: '/settings/webhooks',
|
to: '/settings/webhooks',
|
||||||
name: 'webhooks',
|
name: 'webhooks',
|
||||||
},
|
},
|
||||||
@ -31,7 +33,9 @@ function SettingsPage() {
|
|||||||
<div className="col-md-3">
|
<div className="col-md-3">
|
||||||
<LeftMenu>
|
<LeftMenu>
|
||||||
{menuItems.map(item => {
|
{menuItems.map(item => {
|
||||||
return <LeftMenuList {...item} key={item.title} />;
|
return (
|
||||||
|
<LeftMenuList {...item} key={JSON.stringify(item.title)} />
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</LeftMenu>
|
</LeftMenu>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -79,7 +79,6 @@ function LeftMenuHeader({ count, search, searchable, setSearch, title }) {
|
|||||||
|
|
||||||
LeftMenuHeader.defaultProps = {
|
LeftMenuHeader.defaultProps = {
|
||||||
count: 0,
|
count: 0,
|
||||||
title: null,
|
|
||||||
search: null,
|
search: null,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
setSearch: () => {},
|
setSearch: () => {},
|
||||||
@ -88,8 +87,8 @@ LeftMenuHeader.defaultProps = {
|
|||||||
LeftMenuHeader.propTypes = {
|
LeftMenuHeader.propTypes = {
|
||||||
count: PropTypes.number,
|
count: PropTypes.number,
|
||||||
title: PropTypes.shape({
|
title: PropTypes.shape({
|
||||||
id: PropTypes.string,
|
id: PropTypes.string.isRequired,
|
||||||
}),
|
}).isRequired,
|
||||||
search: PropTypes.string,
|
search: PropTypes.string,
|
||||||
searchable: PropTypes.bool,
|
searchable: PropTypes.bool,
|
||||||
setSearch: PropTypes.func,
|
setSearch: PropTypes.func,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user