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