Remove fontawesome icon for plugins link

Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
soupette 2021-11-05 15:09:06 +01:00
parent 58561e4ae9
commit d0090ce89a
6 changed files with 30 additions and 30 deletions

View File

@ -1,7 +1,6 @@
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import styled from 'styled-components'; import styled from 'styled-components';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
import { NavLink as Link } from 'react-router-dom'; import { NavLink as Link } from 'react-router-dom';
import { Divider } from '@strapi/design-system/Divider'; import { Divider } from '@strapi/design-system/Divider';
@ -112,18 +111,22 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
{generalSectionLinks.length > 0 ? ( {generalSectionLinks.length > 0 ? (
<NavSection label="General"> <NavSection label="General">
{generalSectionLinks.map(link => ( {generalSectionLinks.map(link => {
<NavLink const LinkIcon = link.icon;
badgeContent={
(link.notificationsCount > 0 && link.notificationsCount.toString()) || undefined return (
} <NavLink
to={link.to} badgeContent={
key={link.to} (link.notificationsCount > 0 && link.notificationsCount.toString()) || undefined
icon={<FontAwesomeIcon icon={link.icon} />} }
> to={link.to}
{formatMessage(link.intlLabel)} key={link.to}
</NavLink> icon={<LinkIcon />}
))} >
{formatMessage(link.intlLabel)}
</NavLink>
);
})}
</NavSection> </NavSection>
) : null} ) : null}
</NavSections> </NavSections>

View File

@ -1,11 +1,14 @@
/* eslint-disable consistent-return */ /* eslint-disable consistent-return */
import produce from 'immer'; import produce from 'immer';
import Cog from '@strapi/icons/Cog';
import Puzzle from '@strapi/icons/Puzzle';
import ShoppingCart from '@strapi/icons/ShoppingCart';
import adminPermissions from '../../permissions'; import adminPermissions from '../../permissions';
const initialState = { const initialState = {
generalSectionLinks: [ generalSectionLinks: [
{ {
icon: 'list', icon: Puzzle,
intlLabel: { intlLabel: {
id: 'app.components.LeftMenuLinkContainer.listPlugins', id: 'app.components.LeftMenuLinkContainer.listPlugins',
defaultMessage: 'Plugins', defaultMessage: 'Plugins',
@ -14,7 +17,7 @@ const initialState = {
permissions: adminPermissions.marketplace.main, permissions: adminPermissions.marketplace.main,
}, },
{ {
icon: 'shopping-basket', icon: ShoppingCart,
intlLabel: { intlLabel: {
id: 'app.components.LeftMenuLinkContainer.installNewPlugin', id: 'app.components.LeftMenuLinkContainer.installNewPlugin',
defaultMessage: 'Marketplace', defaultMessage: 'Marketplace',
@ -23,7 +26,7 @@ const initialState = {
permissions: adminPermissions.marketplace.main, permissions: adminPermissions.marketplace.main,
}, },
{ {
icon: 'cog', icon: Cog,
intlLabel: { intlLabel: {
id: 'app.components.LeftMenuLinkContainer.settings', id: 'app.components.LeftMenuLinkContainer.settings',
defaultMessage: 'Settings', defaultMessage: 'Settings',

View File

@ -5,9 +5,8 @@
*/ */
import React from 'react'; import React from 'react';
import { Icon } from '@strapi/design-system/Icon'; import Layout from '@strapi/icons/Layout';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const PluginIcon = () => <Icon as={() => <FontAwesomeIcon icon="paint-brush" />} width="16px" />; const PluginIcon = () => <Layout />;
export default PluginIcon; export default PluginIcon;

View File

@ -5,11 +5,8 @@
*/ */
import React from 'react'; import React from 'react';
import { Icon } from '@strapi/design-system/Icon'; import Landscape from '@strapi/icons/Landscape';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const PluginIcon = () => ( const PluginIcon = () => <Landscape />;
<Icon as={() => <FontAwesomeIcon icon="cloud-upload-alt" />} width="16px" />
);
export default PluginIcon; export default PluginIcon;

View File

@ -5,9 +5,8 @@
*/ */
import React from 'react'; import React from 'react';
import { Icon } from '@strapi/design-system/Icon'; import Puzzle from '@strapi/icons/Puzzle';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const PluginIcon = () => <Icon as={() => <FontAwesomeIcon icon="plug" />} width="16px" />; const PluginIcon = () => <Puzzle />;
export default PluginIcon; export default PluginIcon;

View File

@ -5,9 +5,8 @@
*/ */
import React from 'react'; import React from 'react';
import { Icon } from '@strapi/design-system/Icon'; import Information from '@strapi/icons/Information';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const PluginIcon = () => <Icon as={() => <FontAwesomeIcon icon="book" />} width="16px" />; const PluginIcon = () => <Information />;
export default PluginIcon; export default PluginIcon;